python图

import turtle as t
t.pu()# 提笔
t.goto(300,-200)
t.pd()# 落笔
t.begin_fill()
t.fillcolor("red")
t.pencolor("red")
t.seth(-180)
t.fd(576)
t.seth(90)
t.fd(384)
t.right(90)
t.fd(576)
t.right(90)
t.fd(384)
t.end_fill()
t.left(90)

t.pu()
t.goto(-200,80)
t.pd()
t.begin_fill()
t.fillcolor("yellow")
t.pencolor("yellow")
for x in range(5):
  t.forward(80)
  t.right(144)
t.end_fill()

t.pu()
t.goto(-110,120)
t.pd()
t.left(36)
t.begin_fill()
t.fillcolor("yellow")
t.pencolor("yellow")
for x in range(5):
  t.forward(25)
  t.right(144)
t.end_fill()

t.pu()
t.goto(-80,80)
t.pd()

t.begin_fill()
t.fillcolor("yellow")
t.pencolor("yellow")
for x in range(5):
  t.forward(25)
  t.right(144)
t.end_fill()

t.pu()
t.goto(-73,34)
t.pd()
t.left(36)
t.begin_fill()
t.fillcolor("yellow")
t.pencolor("yellow")
for x in range(5):
  t.forward(25)
  t.right(144)
t.end_fill()

t.pu()
t.goto(-84,6)
t.pd()
t.left(120)
t.begin_fill()
t.fillcolor("yellow")
t.pencolor("yellow")
for x in range(5):
  t.forward(25)
  t.right(144)
t.end_fill()
t.hideturtle()

猜你喜欢

转载自blog.csdn.net/qq_50777680/article/details/120847387