Commit e5bc25c1 by BellCodeEditor

save project

parent a3a66a45
Showing with 8 additions and 3 deletions
......@@ -8,12 +8,16 @@ score = {'悟空': student1, '诺依': student2, '小贝': student3}
# 查询并打印出输入的名字对应的所有科目的成绩
name=input('你叫什么名字')
if name=='悟空':
while True:
if name not in score:
print('输入名字不对,请重新输入')
if name=='悟空':
for a,v in student1.items():
print(a,v)
if name=='诺伊':
if name=='诺伊':
for a,v in student2.items():
print(a,v)
if name=='小贝':
if name=='小贝':
for a,v in student3.items():
print(a,v)
name=input('你叫什么名字')
\ 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