diff --git a/python.py b/python.py new file mode 100644 index 0000000..ace82d2 --- /dev/null +++ b/python.py @@ -0,0 +1,21 @@ +n=input("enter the calculation to be done in format (e to exit) : ") +while(n!='e'): + x=n.split(" ") + a=int(x[0]) + c=(x[1]) + b=int(x[2]) + if (c=='+'): + print(a+b) + elif(c=='-'): + print(a-b) + elif(c=='*'): + print(a*b) + elif(c=='/'): + print(a/b) + elif(c=='^'): + print(a**b) + else: + print("invalid syntax") + n=input("enter the calculation to be done in format (e to exit) : ") + +