Commit 2ae1988f by BellCodeEditor

save project

parent 63cc8d4d
Showing with 13 additions and 7 deletions
score = {'语文':91,'数学':88,'英语':85} s1={'语文':999999999999999999999999999999999999999999999,'数学':1000000000000000000,'英语':100000000000000000000000000000000000}
s2={'语文':9,'数学':1,'英语':10}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 s3={'语文':59.9999999999999,'数学':59.9999999,'英语':59.999999999999}
student={"李昊冉":s1,"铁公鸡":s2,"海公牛":s3}
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出
name=input("请输入姓名:")
for k,v in score.items(): if name in student:
print(k,v) score = student[name]
\ No newline at end of file for k,v in score.items():
print(k,v)
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