This blog is all about Cyber Security and IT

Showing posts with label easy. Show all posts
Showing posts with label easy. Show all posts

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")