This blog is all about Cyber Security and IT

Wednesday, February 6, 2019

Advanced Calculator in Python



#advanced calculator

num1 = float(input("Enter your first number: "))
op = input("Enter the operator: ")
num2 = float(input("Enter the second number : "))
if op == "+":
print(num1 + num2)
elif op == "-":
print(num1 - num2)
elif op == "/":
print(num1 / num2)
elif op == "*":
print(num1 * num2)

else:
print("Invalid Operator")

















0 comments:

Post a Comment