Commit b189f242 by BellCodeEditor

auto save

parent 5626717f
Showing with 19 additions and 0 deletions
......@@ -11,3 +11,5 @@ print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero={'猴三':10,'猴一':21,'猴五':22,'猴队长':29,'猴七':30}
print(dict_hero)
print dict_hero['赵一']
dict_hero['丁二']=47
\ No newline at end of file
dict={'可乐':3,'牛奶':4,'水':1,'辣条':3,'烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
k=input("你需要买什么")
if k dict:
print("叮咚,您的'+k+'需支付'+str(dict[k])+'元')
\ No newline at end of file
dict={'牛奶':4,'水':1,'辣条':3,'烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
k=input('请输入你的姓名:')
v=input('请输入你的最新成绩:')
if k in dict:
if int(v)>dict[k]:
dict[k]=int(v)
print(k+'同学,恭喜你~成绩已更新为'+v+'分!')
else:
print(k+'同学,遗憾的通知你,成绩为被刷新。')
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