画五星红旗
import turtle turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') def drawStart(localx,localy,size): turtle.begin_fill() turtle.up() turtle.goto(localx,localy) turtle.down() for i in range(5): turtle.forward(size) turtle.right(144) turtle.color('yellow') turtle.end_fill() def drawsmallStart(localx,localy,size): turtle.begin_fill() turtle.up() turtle.goto(localx,localy) turtle.down() for i in range(5): turtle.forward(size) turtle.left(144) turtle.color('yellow') turtle.end_fill() drawStart(-300, 150, 100) drawsmallStart(-150, 250,50) drawsmallStart(-100, 180,50) drawsmallStart(-108, 95,50) drawsmallStart(-150, 30,50) turtle.done()