# -*- coding: UTF-8 -*- import turtle turtle.color("yellow") turtle.bgcolor("red") turtle.fillcolor("yellow") def mygoto(x,y): turtle.up() turtle.goto(x,y) turtle.down() def drawstar(r): turtle.begin_fill() for i in range(5): turtle.forward(r) turtle.right(144) turtle.end_fill() mygoto(-300,150) drawstar(100) mygoto(-200,250) drawstar(50) mygoto(-120,180) drawstar(50) mygoto(-120,100) drawstar(50) mygoto(-200,30) drawstar(50) turtle.done()
截图: