Commit fefd1d46 by BellCodeEditor

auto save

parent 9c745b51
Showing with 47 additions and 19 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} import turtle as t
student2 = {'语文': 97, '数学': 98, '英语': 90} t.screensize(400,300,"yellow")
student3 = {'语文': 95, '数学': 100, '英语': 93} t.pensize(4)
score = {'悟空': student1, '诺依': student2, '小贝': student3} t.colormode(255)
t.color((255,155,192),"pink")
t.setup(840,500)
t.speed(10000000000000000)
t.pu()
# 查询并打印出输入的名字对应的所有科目的成绩 t.goto(-100,100)
while True : t.pd()
name = input("名字:") t.seth(-30)
if name in score : t.begin_fill()
a = score[name] a=0.4
print('*'*30) for i in range(120):
for k,v in a.items(): if 0<= i<30 or 60<=i<90:
print(k,v) a+=0.08
break t.left(3)
t.fd(a)
else: else:
print('输入错误') a=a-0.08
\ No newline at end of file t.lt(3)
t.fd(a)
t.end_fill()
t.pu()
t.seth(90)
t.fd(25)
t.pd()
t.pencolor(255,155,192)
t.seth(10)
t.begin_fill()
t.circle(5)
t.color(160,82,45)
t.end_fill()
t.pu()
t.seth(0)
t.fd(20)
t.pd()
t.pencolor(255,155,192)
t.seth(10)
t.begin_fill()
t.circle(5)
t.color(160,82,45)
t.end_fill()
t.color((255,155,192),"pink")
t.pu()
t.done()
\ 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