Commit 330785c1 by BellCodeEditor

save project

parent 3f0559c0
Showing with 15 additions and 18 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} import turtle
student2 = {'语文': 97, '数学': 98, '英语': 90} turtle.pensize(10)
student3 = {'语文': 95, '数学': 100, '英语': 93} turtle.color("black","blue")
score = {'悟空': student1, '诺依': student2, '小贝': student3} turtle.begin_fill()
while True: turtle.circle(50)
print('按下q退出') turtle.end_fill()
name=input("请输入要查询的名字:") turtle.seth(90)
print("*"*30) turtle.forward(90)
if name in score: turtle.seth(60)
for k,v in score[name].items(): turtle.forward(180)
print(k,v) turtle.home()
elif name=="q": turtle.seth(-90)
print('程序结束') turtle.forward(90)
break turtle.seth(-60)
else: turtle.forward(180)
print("查询错误,请重试")
print("*"*30)
# 查询并打印出输入的名字对应的所有科目的成绩 # 查询并打印出输入的名字对应的所有科目的成绩
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