Commit 8e9b1606 by BellCodeEditor

save project

parent 6c221d40
Showing with 7 additions and 2 deletions
cg = {'小明':66,'小刚':50,'小美':96,'小李':73,} cg = {'小明':66,'小刚':50,'小美':96,'小李':73,}
k = ('输入你的姓名:') k = input('输入你的姓名:')
x = ('输入你的成绩:') x = input('输入你的成绩:')
if k in cg: if k in cg:
if int(x) < cg[k]: if int(x) < cg[k]:
cg[k] = int(x) cg[k] = int(x)
print(k + '成绩是' + x) print(k + '成绩是' + x)
else:
print(k + '成绩不变')
else:
cg[k] = int(x)
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