【Python】简单计算器
#python 3.7.1 print("operation codes are:") print("1 for multiply") print("2 for division") print("3 for addition") print("4 for subtraction") num1=int(input("first number here:")) num2=int(input("second number here:")) operator=int(input("operation code:")) while operator is 1: print(num1*num2) break while operator is 2: print(num1/num2) break while operator is 3: print( num1+num2) break while operator is 4: print( num1-num2) break
本文来自博客园,作者:木子欢儿,转载请注明原文链接:https://www.cnblogs.com/HGNET/p/12120785.html