Turtle 画方形 画圆 画三角形 参考文档https://docs.python.org/3/library/turtle.html?highlight=turtle%20circle#turtle.circle
import turtle
def draw_square():
brad = turtle.Turtle()
brad.shape("turtle")
brad.color("yellow")
brad.speed(1)
num = 0
while num < 4:
brad.forward(100)
brad.right(90)
num += 1
def draw_circle():
brad = turtle.Turtle()
brad.shape('arrow')
brad.color("red")
brad.circle(120)
brad.speed(2)
def draw_trigon():
brad = turtle.Turtle()
brad.shape('classic')
brad.color('blue')
num = 0
while num < 3:
brad.forward(50)
brad.right(120)
brad.speed(1)
num += 1
def drawing():
window = turtle.Screen()
window.bgcolor("white")
draw_square()
draw_circle()
draw_trigon()
window.exitonclick()
drawing()