判断是不是会员,怎么打折
a = input('你是会员吗')
n = float(input('你的消费金额'))
if a == 'y' :
if n >=200 :
print('打八折,付款金额为',n*float(0.8))
elif n>=100 and n<200:
print('打九折,付款金额为',n*float(0.9))
else:print('不打折,付款金额为',n)
print('是会员')
else:
if n >= 200 :
print('打九折,你的消费金额是',n*float(0.9))
elif n >= 100 and n<200:
print('打九五折,你的消费金额是',n*float(0.95))
else:
print('不打折,你的消费金额是',float(n))
print('非会员')
打印某个字符串100次
for _ in range(10): #用下划线_替代要打印的内容,然后在print(输入要打印的具体内容)
print('这是一个参数')