diff --git a/simple calculator.py b/simple calculator.py new file mode 100644 index 0000000..e4f57d7 --- /dev/null +++ b/simple calculator.py @@ -0,0 +1,23 @@ +num1 = float(input("Enter first number: ")) +num2 = float(input("Enter second number: ")) + +print("Operation: +, -, *, /") +select = input("Select operations: ") + + +if select == "+": + print(num1, "+", num2, "=", num1+num2) + +elif select == "-": + print(num1, "-", num2, "=", num1-num2) + + +elif select == "*": + print(num1, "*", num2, "=", num1*num2) + + +elif select == "/": + print(num1, "/", num2, "=", num1/num2) + +else: + print("Invalid input")