Commit 3e525537 by BellCodeEditor

save project

parent a0d54ad5
Showing with 14 additions and 20 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} import turtle
student2 = {'语文': 97, '数学': 98, '英语': 90} pen1=turtle.Pen()
student3 = {'语文': 95, '数学': 100, '英语': 93} pen1.pencolor("red")
score = {'悟空': student1, '诺依': student2, '小贝': student3} pen1.pensize(5)
len=60
pen1.left(45)
pen1.forward(2*len)
pen1.circle(len,180)
# 查询并打印出输入的名字对应的所有科目的成绩 pen1.right(90)
while True : pen1.circle(len,180)
name = input("名字:") pen1.forward(2*len)
if name in score : pen1.hideturtle()
a = score[name] turtle.done()
print('*'*30) \ No newline at end of file
for k,v in a.items():
print(k,v)
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