Turtle图形绘制(绘制奥运五环)

绘制奥运五环图,其中五种颜色分别为蓝色、黑色、红色、黄色和绿色。注意根据实际效果调整圆形的大小和位置。效果如图所示。

import turtle

turtle.pensize(10)

turtle.color("blue")
turtle.penup()
turtle.goto(-110,-25)
turtle.pendown()
turtle.circle(45)

turtle.color("black")
turtle.penup()
turtle.goto(0,-25)
turtle.pendown()
turtle.circle(45)

turtle.color("red")
turtle.penup()
turtle.goto(110,-25)
turtle.pendown()
turtle.circle(45)

turtle.color("yellow")
turtle.penup()
turtle.goto(-55,-75)
turtle.pendown()
turtle.circle(45)

turtle.color("green")
turtle.penup()
turtle.goto(55,-75)
turtle.pendown()
turtle.circle(45)

Turtle图形绘制(绘制奥运五环)_第1张图片
 

 

你可能感兴趣的:(Python,python)