图案一,半圆
import turtleturtle.circle(50, 180)turtle.left(90)turtle.forward(100)
图案二,同心圆
import turtleturtle.circle(100)turtle.right(90)turtle.penup()turtle.forward(50)turtle.pendown()turtle.left(90)turtle.circle(150)
图案三,红心
import turtleturtle.color('red')turtle.begin_fill()for i in range(5):turtle.forward(100)turtle.right(144)turtle.end_fill()turtle.hideturtle()
图案四,四叶草
import turtleturtle.fillcolor("green")turtle.begin_fill()for i in range(4):turtle.right(90)turtle.circle(100,180)turtle.end_fill()
图案五,螺旋正方形
import turtleturtle.width(3)d=0k=5for j in range(10):for i in range(4):turtle.forward(k)d+=(90+1)turtle.seth(d)k+=5