Commit dafbec4b by BellCodeEditor

save project

parent f4729893
Showing with 11 additions and 7 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
dict= {'🍕':3,'🧃':4,'🍗':1,'🍦':3,'🍛':2,'🍟':4,'🥮':5,'🥨':10,'🍰':6}
k=input('你想买什么?')
if k in dict:
print('叮咚~你的'+k+'需要支付'+str(dict[k])+'元~')
cost={'苹果': 5,'香蕉': 3,'李子': 6,';荔枝': 10,'甘蔗': 8,'葡萄': 5,'榴莲': 7,'桃子': 6,'山竹': 7}
k=input("请输入水果名称:")
v=input("请输入水果价格:")
if k in cost:
if float(v)<cost[k]:
cost[k]=flots(v)
print(k+'降价了,现降'+v+'元')
else:
print(k+'涨价了,我们不买')
else:
print('百货机没有你需要的东西')
\ No newline at end of file
cost[k] = float(v)
print(k+'的价钱'+v+'元已上传~')
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