Commit b89c985c by BellCodeEditor

save project

parent 8d62bb10
Showing with 18 additions and 12 deletions
...@@ -4,15 +4,21 @@ student3 = {'语文': 95, '数学': 100, '英语': 93} ...@@ -4,15 +4,21 @@ student3 = {'语文': 95, '数学': 100, '英语': 93}
score = {'悟空': student1, '诺依': student2, '小贝': student3} score = {'悟空': student1, '诺依': student2, '小贝': student3}
while True: while True:
a=input("请问您要查询谁的成绩?(退出请输入'e')") print("*" * 35)
if a in score: b=input("请问您要查询成绩还是更新程序?(查询--c,更新--d)")
print("*" * 35) if b=="c"
for m,n in score[a].items(): a=input("请问您要查询谁的成绩?(退出请输入'e')")
print(m,n) if a in score:
elif a=="e": print("*" * 35)
break for m,n in score[a].items():
print(m,n)
elif a=="e":
print("*" * 35)
print("查询结束")
else:
print("*" * 35)
print("输入错误,请重新输入")
elif b=="d":
# wait
else: else:
print("*" * 35) print("输错了,请重新输入")
print("输入错误,请重输") \ No newline at end of file
print("*" * 35)
print("程序结束")
\ 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