Commit 76ea758d by BellCodeEditor

save project

parent a70aa28e
Showing with 7 additions and 4 deletions
......@@ -3,6 +3,9 @@ stu2={"chinese":3,"maths":4,"english":5}
stu3={"chinese":6,"maths":7,"english":8}
w={"stu1":stu1,"stu2":stu2,"stu3":stu3}
n=input("input name ")
info=w[n]
for i,j in info.items():
print(i,j)
\ No newline at end of file
if n in w:
info=w[n]
for i,j in info.items():
print(i,j)
else:
print("input right string!")
\ 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