一看就知道上课不认真学习,这么简单的,我也不怎么XIE
sum=(你要输入的值)
discount=0
if sum>50&&sum<100
discount=10%
elif sum >=100
discount=20%
sum=sum*10%
print "折扣:"+discount"|最终价格:"+sum
p1 = eval(input("输入购买价格:"));
s = 0;
if(p1 >= 50 and p1 <= 100):
s = 10;
elif(p1 > 100):
s = 20;
print('折扣:{}%,价格:{}\n'.format(s,p1 * (1 - s / 100)));