Commit cb5db3f9 by BellCodeEditor

save project

parent 50766152
Showing with 20 additions and 13 deletions
score= {'x':6,'xx':7,'xxx':9} # score= {'x':6,'xx':7,'xxx':9}
k=input('姓名') # k=input('姓名')
v=input('成绩') # v=input('成绩')
if k in score: # if k in score:
if int(v)>score[k]: # if int(v)>score[k]:
score[k]=int(v) # score[k]=int(v)
print(k+'同学,你的成绩被刷新为'+v+'分') # print(k+'同学,你的成绩被刷新为'+v+'分')
else: # else:
print(k+'同学,你的成绩未被刷新') # print(k+'同学,你的成绩未被刷新')
else: # else:
score[k]=int(v) # score[k]=int(v)
print(k+'同学,第一次成绩'+v+'分以上传') # print(k+'同学,第一次成绩'+v+'分以上传')
\ No newline at end of file # s= {'x':6,'xx':7,'xxx':9}
# data = s.pop('x')
# print(data)
# print(s)
w= {'语文':61,'数学':72,'英语':93}
for i,v in w.items():
print(i+v)
\ 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