Commit 185ee6a4 by BellCodeEditor

save project

parent a18398b9
Showing with 10 additions and 6 deletions
student1 = {'语文':1,'数学':100,'英语'2} student1 = {'语文':1,'数学':100,'英语':2}
student2 = {'语文'0.01,'数学':1,'英语'20}= {} student2 = {'语文':11,'数学':1,'英语':20}
student3 = {'语文'0.000001,'数学':9,'英语'42} student3 = {'语文':0.000001,'数学':9,'英语':42}
score = {'悟空':student1,'诺伊':student2,'核武':student3} score = {'悟空':student1,'诺伊':student2,'核武':student3}
name = input("名字:") name = input("名字:")
info=score[name] print("*"*30)
for k,v in a,items(): if name in score:
score=score[name]
for k,v in score.items():
print(k,v) print(k,v)
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 print("*"*30)
else:
print("考虑到离开大陆旅客!!!")
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