Commit bff45109 by BellCodeEditor

save project

parent 3000735d
Showing with 18 additions and 2 deletions
score = {'语文':91,'数学':88,'英语':85}
u1 = {'语文':83,'数学全练卷':0,'数学同步卷':0,'英语':83}
u2 = {'语文':79.5,'数学全练卷':94,'数学同步卷':88,'英语':99}
u3 = {'语文':95,'数学全练卷':98,'数学同步卷':100,'英语':93}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
score = {"一单元":u1,"二单元":u2,"三单元":u3,}
while True:
name = input("请输入要查询的单元:")
print("*"*20)
if name in score:
info = score[name]
for k,v in info.items():
print(k,v)
print("*"*20)
elif name == "q":
break
else:
print("查询错误,请输入正确的单元!")
\ 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