Commit b6d3ed48 by BellCodeEditor

save project

parent f0c715f8
Showing with 24 additions and 0 deletions
student1 = {'Chinese': 91, 'math': 88, 'English': 85}
student2 = {'Chinese': 97, 'math': 98, 'English': 90}
student3 = {'Chinese': 95, 'math': 100, 'English': 93}
student4 = {'Chinese': 97, 'math': 88, 'English': 58}
student5 = {'Chinese': 98.5, 'math': 100, 'English': 100}
score = {'a': student1, 'b': student2, 'c': student3,'d': student4,'z': student5}
# 查询并打印出输入的名字对应的所有科目的成绩
while True :
print("please input your name,queit input q ")
name = input("name: ")
if name in score :
a = score[name]
print('*'*30)
for k,v in a.items():
print(k,v)
elif name == "q":
break
else:
print('NameError......')
\ 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