
#Calculator

def add(num1,num2):
    result = num1 + num2
    return (result)

def sub(num1,num2):
    result = num1 - num2
    return (result)

def mul(num1,num2):
    result = num1 * num2
    return (result)

def div(num1,num2):
    if num2 == 0 :
        return ("Cannot Divide by Zero")
    else:
        return (num1/num2)

def square(num1):
    result = num1*num1
    return (result)

def sqrt(num1):
    result = num1**.5
    return (result)

while True:

    # print("Welcome")
    print("Please select below operations"
          "\n   1.Addtion"
          "\n   2.Subtraction"
          "\n   3.Multiplication"
          "\n   4.Division"
          "\n   5.Square of any number"
          "\n   6.Square Root of any number"
          "\n   7.To Quit ")

    option  = int(input("\nEnter the operation : "))

    if option == 7:
        print("Bye")
        break


    num1 = int(input("Enter Number 1 : "))

    for i in range(num1):
        if option == 5:
            r1 = num1 * num1
            print(f"Square of {num1} is {r1}")
            break
        if option == 6:
            r2 = num1 ** .5
            print(f"Square root of {num1} is {r2} ")
            break
        else:
            num2 = int(input("Enter number 2 : "))
            break

    if option == 1:
        print(add(num1,num2))
    elif option == 2:
        print(sub(num1,num2))
    elif option == 3:
        print(mul(num1,num2))
    elif option == 4:
        print(div(num1,num2))

    print("\n")







