x = int(input("x=")) if x < 1600 : #如果x小于1600,y等于0 y = 0 #没有折扣 print("应付款:",x - (x * y))#y等于折扣价应该是总价格减去折扣金额 elif 1600 <= x < 2400:# y = 0.05 #折扣5% print("应付款:",x - (x * y)) elif 2400 <= x < 3200: y=0.1 #折扣10% print("应付款:", x - (x * y)) elif 3200 <= x < 6400: y = 0.15 #折扣15% print("应付款:", x - (x * y)) else: #这里表示x大于6400的金额 y = 0.2 #折扣是20% print("应付款:", x - (x * y))