python 基础
import turtle turtle.setup(600, 400, 0, 0) turtle.color("yellow") turtle.bgcolor("red") turtle.fillcolor("yellow") def whr_goto(x, y): turtle.up() turtle.goto(x, y) turtle.down() def whr_draw(r): turtle.begin_fill() for i in range(5): turtle.forward(r) turtle.right(144) turtle.end_fill() whr_goto(-600, 220) whr_draw(150) whr_goto(-400, 295) whr_draw(50) whr_goto(-350, 212) whr_draw(30) whr_goto(-350, 145) whr_draw(30) whr_goto(-400, 90) whr_draw(30)