python利用turtle绘制同心圆

绘制同心圆

程序如下

import turtle as t
t.setup(650,650)
t.pencolor("green")
t.pensize(2.5)
t.penup()
t.fd(50)
t.pendown()
t.left(90)
t.circle(50,360)
t.right(90)
t.penup()
t.fd(20)
t.pendown()
t.left(90)
t.circle(70,360)
t.right(90)
t.penup()
t.fd(20)
t.pendown()
t.left(90)
t.circle(90,360)
t.right(90)
t.penup()
t.fd(20)
t.pendown()
t.left(90)
t.circle(110,360)
t.right(90)
t.penup()
t.fd(20)
t.pendown()
t.left(90)
t.circle(130,360)
t.done()

运行结果

发布了42 篇原创文章 · 获赞 1 · 访问量 2707

猜你喜欢

转载自blog.csdn.net/qq_40253803/article/details/104749393