Commit a5b169f7 by BellCodeEditor

save project

parent 433aef0f
Showing with 4 additions and 4 deletions
dict_shit= {'小明':100,'小红':42}
name=input('请输入姓名:')
s=input('请输入成绩:')
if name in dict_shit:
if int(s)>dict_shit[name]:
if name in dict_shit and int(s)>dict_shit[name]:
dict_shit[name]=int(s)
print(dict_shit)
else:
elif not name in dict_shit:
dict_shit[name]=int(s)
print(dict_shit)
else:
dict_shit[name]=int(s)
print(dict_shit)
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