📜  如何在python代码示例中制作一个复杂的计算器

📅  最后修改于: 2022-03-11 14:45:42.821000             🧑  作者: Mango

代码示例1
Just Ctrl-C and Ctrl-V

num1 = float(input("Enter first number... "))
op = input("Enter an Operation... ")
num2 = float(input("Enter second number... "))
if op == ("+"):
    print(num1+num2)
elif op == ("-"):
    print(num1-num2)
elif op == ("*"):
    print(num1 * num2)
elif op == ("/"):
    print(num1/num2)