Commit 922ef90b by BellCodeEditor

save project

parent 62692a77
Showing with 57 additions and 0 deletions
student1 = {'力量': 191, '速度': 188, "马内": 185}
student2 = {'力量': 101, '速度': 108, "马内": 85}
student3 = {'力量': 91, '速度': 88, "马内": 85}
score = {'钢铁侠': student1, '黑锅侠': student2, '铁锅侠': student3}
# 查询并打印出输入的名字对应的所有科目的成绩
while True :
name = input("名字:")
if name in score :
a = score[name]
print('*'*30)
for k,v in a.items():
print(k,v)
break
else:
print('输入错误')
\ No newline at end of file
student1 = {'语文': 91, '数学': 88, '英语': 85}
student2 = {'语文': 97, '数学': 98, '英语': 90}
student3 = {'语文': 95, '数学': 100, '英语': 93}
student4 = {'语文': 60, '数学': 60, '英语': 60}
score = {'悟空': student1, '诺依': student2, '小贝': student3,"瑟夫":student4}
while True :
print("请输入要输入的人,如果不输入请按p。")
name = input("名字:")
if name in score :
a = score[name]
print('*'*30)
for k,v in a.items():
print(k,v)
print('*'*30)
elif name =="p" :
break
else:
print('输入错误')
\ No newline at end of file
student1 = {'攻击': 91, '速度': 88, '钱': 85}
student2 = {'攻击': 97, '速度': 98, '钱': 90}
student3 = {'攻击': 95, '速度': 100, '钱': 93}
student4 = {'攻击': 60, '速度': 60, '钱': 60}
while True :
name = input("名字")
if name in score :
a = score[name]
print('*'*30)
for k,v in a.items():
print(k,v)
print('*'*30)
break
else:
print('输入错误')
score={"米国队长"student2"铁锅侠"student1:}
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