diff --git a/diy2.py b/diy2.py index 2f3be54..55ef4fc 100644 --- a/diy2.py +++ b/diy2.py @@ -1,6 +1,11 @@ -score = {'语文':0,'数学':0,'英语':0} -for k,v in score.items(): - print(k,v) +student1 = {'语文':-2,'数学':-13,'英语':-10} +student2 = {'语文':0,'数学':0,'英语':0} +student3 = {'语文':-100000000000000000000,'数学':-100000000000000000000000,'英语':0} +score={"谢坤辰":student1,"于潇然":student2,"丸子老师":student3} # 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来 - +while True: + name=input("你他妈想查谁成绩???") + w=score[name] + for s,k in w.items(): + print(s,k)