# -*- coding:UTF-8 -*-
# -*- author: Hiro -*-
import turtle
from turtle import *


turtle.setup(600,400,0,0)
turtle.bgcolor('red')
turtle.color('yellow')
turtle.fillcolor('yellow')
def mygoto(x,y):
    turtle.up()
    turtle.goto(x,y)
    turtle.down()

def draw(x):
    begin_fill()
    for i in range(5):
        turtle.forward(x)
        turtle.right(144)
    end_fill()




mygoto(-250,120)
draw(90)
mygoto(-135,170)
draw(25)
mygoto(-100,140)
draw(25)
mygoto(-110,95)
draw(25)
mygoto(-135,60)
draw(25)
turtle.done()

运行结果截图:
python-turtle的应用

 

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2021-06-23
  • 2021-10-08
  • 2021-05-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2021-10-04
  • 2021-12-08
  • 2021-05-19
  • 2022-12-23
相关资源
相似解决方案