python基础
from turtle import * import turtle import sys def my_draw(n): turtle.begin_fill() for i in range(5): turtle.forward(n) turtle.right(144) turtle.end_fill() def myongo(x,y): turtle.up() turtle.goto(x,y) turtle.down() turtle.bgcolor('red') turtle.color('yellow') turtle.fillcolor('yellow') turtle.setup(600,400,120,120) turtle.hideturtle() myongo(-250,75) my_draw(80) myongo(-140,150) my_draw(30) myongo(-110,100) my_draw(30) myongo(-110,40) my_draw(30) myongo(-140,-10) my_draw(30) turtle.done()