Commit 7c56c77f by BellCodeEditor

auto save

parent 7fca790b
Showing with 14 additions and 0 deletions
std_dic = {'张三':28,'李四':32,'王五':45,"赵六":50,'钱大妈':12}
std_name = input("请输入学生的名字:")
std_score = int(input("请输入学生的分数:"))
if std_name in std_dic:
if std_dic[std_name] < std_score:
std_dic[std_name] = std_score
print("恭喜 "+std_name+" 同学你的分数已经刷新为:"+ str(std_score))
else:
print("不好意思"+std_name+ "同学,你的成绩太差,不能更新,继续加油!" )
else:
std_dic[std_name] = std_score
print("恭喜"+std_name+"添加进入了班级分数!")
print(std_dic)
\ 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