BC65 计算商品打折结算金额

思路:

step1:输入金额;按照要求判断所属区间;格式化输出;

代码如下:

n = float(input())
if n >= 5000:
    money = n*0.6
elif n >= 2000:
    money = n*0.7
elif n >= 500:
    money = n*0.8
elif n >= 100:
    money = n*0.9
money = money + 0.000001
print('{:.1f}'.format(money))