diff --git a/123.py b/123.py new file mode 100644 index 0000000..3c688ca --- /dev/null +++ b/123.py @@ -0,0 +1,14 @@ +CJ = {} +while True: + name = input("请输入你的姓名:") + scroe = input("请输入你的成绩:") + if name in CJ: + if int(scroe) > CJ[name]: + print("亲爱的" + name +"同学,你的成绩"+ scroe +"分已更新。" ) + CJ[name]=int(scroe) + else: + print("你的最高成绩没有变化。") + else: + CJ[name]=int(scroe) + print("亲爱的" + name +"同学,你的第一次成绩"+ scroe +"分已添加。" ) + print(CJ) \ No newline at end of file