source code by -Ak
CSE_TECH'S
-
#simple calculator in python
print("welcome-")
print("1]addition")
print("2]subtraction")
print("3]multiplication")
print("4]division")
print("5]squre")
print("6]cube")
print("exit")
x=input("enter your choice no : ")
if(x=='1'):
a=input("enter 1st no: ")
b=input("enter 2nd no: ")
c=(int(a)+int(b))
c=str(c)
print("addition is: "+c)
if(x=='2'):
a=input("enter 1st no: ")
b=input("enter 2nd no: ")
c=(int(a)-int(b))
c=str(c)
print("subtraction is: "+c)
if(x=='3'):
a=input("enter 1st no: ")
b=input("enter 2nd no: ")
c=(int(a)*int(b))
c=str(c)
print("multiplication is: "+c)
if(x=='4'):
a=input("enter 1st no: ")
b=input("enter 2nd no: ")
c=(int(a) / int(b))
c=str(c)
print("division is: "+c)
if(x=='5'):
a=input("enter 1st no: ")
c=(int(a)*int(a))
c=str(c)
print("addition is: "+c)
if(x=='6'):
a=input("enter 1st no: ")
c=(int(a)*int(a)*int(a))
c=str(c)
print("addition is: "+c)
if(x=='exit'):
print("thank you...")