Commit 322e14b0 by BellCodeEditor

save project

parent 352e1b17
Showing with 7 additions and 3 deletions
...@@ -3,9 +3,13 @@ q= {'语文':90,'数学':12,'英语':31} ...@@ -3,9 +3,13 @@ q= {'语文':90,'数学':12,'英语':31}
w= {'语文':81,'数学':48,'英语':55} w= {'语文':81,'数学':48,'英语':55}
score={"乔桥":r,"大胖":q,"小胖":w} score={"乔桥":r,"大胖":q,"小胖":w}
a=input("你的名字是?") a=input("你的名字是?")
b=score[a] if a in score:
for k,v in b.items(): b=score[a]
print(k,v) for k,v in b.items():
print(k,v)
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