画五环
import turtle
turtle.width(10)
turtle.color("blue")
turtle.circle(50)
turtle.penup()
turtle.goto(120, 0)
turtle.color("black")
turtle.pendown()
turtle.circle(50)
turtle.penup()
turtle.goto(240, 0)
turtle.color("red")
turtle.pendown()
turtle.circle(50)
turtle.penup()
turtle.goto(60, -45)
turtle.color("yellow")
turtle.pendown()
turtle.circle(50)
turtle.penup()
turtle.goto(180, -45)
turtle.color("green")
turtle.pendown()
turtle.circle(50)
画糖葫芦
import turtle
t=turtle.Pen()
t.penup()
t.goto(20, 0)
t.pendown()
t.begin_fill()
t.fillcolor("red")
t.circle(40)
t.end_fill()
t.penup()
t.goto(60,40)
t.pendown()
t.begin_fill()
t.fillcolor("blue")
t.circle(40)
t.end_fill()
t.penup()
t.goto(100,80)
t.pendown()
t.begin_fill()
t.fillcolor("yellow")
t.circle(40)
t.end_fill()
t.penup()
t.goto(140,120)
t.pendown()
t.begin_fill()
t.fillcolor("purple")
t.circle(40)
t.end_fill()
t.penup()
t.speed(1)
t.width(5)
t.color('orange')
t.goto(-60,-40)
t.pendown()
t.seth(45)
t.forward(350)
turtle.exitonclick()