Commit b89c985c by BellCodeEditor

save project

parent 8d62bb10
Showing with 11 additions and 5 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:
print("*" * 35)
b=input("请问您要查询成绩还是更新程序?(查询--c,更新--d)")
if b=="c"
a=input("请问您要查询谁的成绩?(退出请输入'e')") a=input("请问您要查询谁的成绩?(退出请输入'e')")
if a in score: if a in score:
print("*" * 35) print("*" * 35)
for m,n in score[a].items(): for m,n in score[a].items():
print(m,n) print(m,n)
elif a=="e": elif a=="e":
break print("*" * 35)
print("查询结束")
else: else:
print("*" * 35) print("*" * 35)
print("输入错误,请重输") print("输入错误,请重新输入")
print("*" * 35) elif b=="d":
print("程序结束") # wait
\ No newline at end of file else:
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