# coding=utf-8 import turtle # 画五角星 def drawStar(x): turtle.begin_fill() for i in range(5): turtle.forward(x) turtle.right(144) turtle.end_fill() # 转移位置 def goTo(x, y): turtle.up() turtle.goto(x, y) turtle.down() turtle.setup(864, 576) turtle.bgcolor("red") turtle.color("yellow") turtle.fillcolor("yellow") turtle.hideturtle() goTo(-380, 120) turtle.showturtle() drawStar(150) for i in range(4): x = 1 if i in [0, 3]: x = 0 goTo(-180+x*50, 180-i*50) turtle.left(18-i*15) drawStar(30) goTo(220, -230) turtle.write("中国", font=(‘Arial‘, 50, ‘normal‘)) turtle.hideturtle() turtle.done()