Commit d150695d by BellCodeEditor

save project

parent f67ed4d7
Showing with 12 additions and 5 deletions
dict={'可乐':3,'牛奶':3,'水':1} dict={'荔枝':3,'苹果':3,'梨':1}
j=input("你要买什么?") j=input("输入水果名称")
k=input("输入水果价钱")
if j in dict: if j in dict:
print('你想要的'+j+'需要'+str(dict[j])) if float(k)<dict[j]:
print(k+'降价了'+'现价'+k+'元')
else:
print(j+'涨价了,我们不买')
else: else:
print("没有")
\ No newline at end of file print(j+'的价钱'+'元'+'已上传')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment