📜  python turtle 绘制3个同心圆 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:44.833000             🧑  作者: Mango

代码示例1
import turtle

turtle.penup()
for i in range(1, 500, 50):
    turtle.right(90)    # Face South
    turtle.forward(i)   # Move one radius
    turtle.right(270)   # Back to start heading
    turtle.pendown()    # Put the pen back down
    turtle.circle(i)    # Draw a circle
    turtle.penup()      # Pen up while we go home
    turtle.home()       # Head back to the start pos