Commit 5338e863 by BellCodeEditor

auto save

parent 5d2aefb9
Showing with 5 additions and 10 deletions
dict={"一":3,"二":4,"三":5,"四":6,"五":7} dict={"可乐":3,"雪碧":4,"薯片":5,"薯条":6,"果汁":7}
k=input("请输入你的姓名") k=input("你想买什么?")
v=input("请输入你的分数")
if k in dict: if k in dict:
if int(v)>dict[k]: print("你购买的商品是"+k+"你需要支付"+str(dict[k]))
dict[k]=int(v)
print("亲爱的"+k+"同学恭喜你分数更新为"+v)
else: else:
dict[k]=int(v) print("不好意思我们没有这个商品")
print("亲爱的"+k+"同学你你的第一次分数为分数更新为"+v \ No newline at end of file
)
\ No newline at end of file
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