# python程序初学者计算器界面_Python初学者，一个简单的计算器程序的数学函数

addition = intFirstOperand + intSecondOperand

print ('What mathematical operation would you like to perform? Enter a number:')

print ('1 - addition')

print ('2 - subtraction')

print ('3 - multiplication')

print ('4 - division')

intOperation = input()

intOperation = int(intOperation)

addition = '1'

subtraction = '2'

multiplication = '3'

division = '4'

if intOperation == 1 :

print ('Please enter the first operand for addition:')

intFirstOperand = input()

print ('Please enter the second operand for addition:')

intSecondOperand = input()

print addition(intFirstOperand, intSecondOperand)

if intOperation == 2 :

print ('Please enter the first operand for subtractiom:')

intFirstOperand = input()

print ('Please enter the second operand for subtraction:')

intSecondOperand = input()

if intOperation == 3 :

print ('Please enter the first operand for multiplication:')

intFirstOperand = input()

print ('Please enter the second operand for multiplication:')

intSecondOperand = input()

if intOperation == 4 :

print ('Please enter the first operand for division:')

intFirstOperand = input()

print ('Please enter the second operand for division:')

intSecondOperand = input()

• 0
点赞
• 0
收藏
• 打赏
• 0
评论
10-20 52
09-01 4万+
07-13
07-14 1万+
11-01
06-09
06-16 1万+
08-31 1万+
09-13 211
09-08 114

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

©️2022 CSDN 皮肤主题：数字20 设计师：CSDN官方博客

weixin_39955351

¥2 ¥4 ¥6 ¥10 ¥20

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。