sh_05_超市买苹果

sh_05_超市买苹果

 1 # 1. 定义苹果的单价
 2 price = 8.5
 3 
 4 # 2. 挑选苹果
 5 weight = 7.5
 6 
 7 # 3. 计算付款金额
 8 money = weight * price
 9 
10 # 4. 只要买苹果,就返回 5 块钱
11 money = money - 5
12 
13 print(money)

猜你喜欢

转载自www.cnblogs.com/shaohan/p/11465042.html