Commit 40f76b97 by BellCodeEditor

save project

parent 203d4c8e
Showing with 95 additions and 6 deletions
...@@ -9,11 +9,100 @@ ...@@ -9,11 +9,100 @@
# break # break
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典 # 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
hp={'可乐':9,'薯片':10,'奥利奥':5,'肉松':3,'尖叫':6} # hp={'可乐':9,'薯片':10,'奥利奥':5,'肉松':3,'尖叫':6}
k=input("你要啥东东?") # k=input("你要啥东东?")
if k in hp: # if k in hp:
print("叮咚,您要买的东西"+k+"需要支付"+str(hp[k])+"元") # print("叮咚,您要买的东西"+k+"需要支付"+str(hp[k])+"元")
else: # else:
print("神奇百货没有,哪凉快哪待着去") # print("神奇百货没有,哪凉快哪待着去")
fs = {'张仕昕':10,'张雨馨':85,'王宣老师'10,'杨师轩':80}
k = input("请输入你的姓名:")
v=input("请输入你的成绩:")
if k in fs:
if int(v)>fs[k]:
fs[k]=int(v)
print("恭喜"+k+"你的成绩已更新为+v+“分")
else
print("很遗憾")
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