Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 432 Bytes

File metadata and controls

17 lines (15 loc) · 432 Bytes

calculator

calculator using Python

first_number = float(input("Enter first number :")) op = input("Enter operator :")

second_number = float(input("Enter second number :")) if op == "+": print(first_number + second_number) elif op == "-": print(first_number-second_number) elif op == "*": print(first_number * second_number) elif op == "/": print(first_number / second_number) else: print("invalid operator")