Commit b6c3b4a0 by BellCodeEditor

auto save

parent 1eef80e1
Showing with 11 additions and 21 deletions
student1 = {'语文': 100, '数学': 100, '英语': 100} import turtle
student2 = {'语文': 97, '数学': 98, '英语': 90} pen = turtle.Pen()
student3 = {'语文': 95, '数学': 100, '英语': 93} pen.fillcolor("red")
score = {'悟空': student1, '诺依': student2, '小贝': student3} pen.begin_fill()
while True: for i in range(36):
print('输入名字,退出请按gun') pen.forward(200)
name = input("名字:") pen.left(170)
print('*'*50) pen.end_fill()
if name in score: pen.hideturtle()
scores=score[name] turtle.done()
for w,a in scores.items(): \ No newline at end of file
print(w,a)
print('*'*50)
elif name=='gun':
break
# 查询并打印出输入的名字对应的所有科目的成绩
else:
print('错误!!!!!!!!!!!!!!!!!!!gun')
print('*'*50)
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