2.画一组同心圆
作者:互联网
1 '''方法一 2 from turtle import * 3 setup(600,400,500,200) 4 color("red") 5 pensize(2) 6 circle(20) 7 for i in range(1,4): 8 penup() 9 goto(0,-10*i) 10 pendown() 11 circle(20+i*10) 12 hideturtle() 13 done()''' 14 15 #方法二 16 import turtle 17 turtle.setup(600,400,500,200) 18 turtle.color("red") 19 turtle.pensize(2) 20 turtle.circle(20) 21 for i in range(1,4): 22 turtle.penup() 23 turtle.goto(0,-10*i) 24 turtle.pendown() 25 turtle.circle(20+i*10) 26 turtle.hideturtle() 27 turtle.done()
标签:turtle,10,20,600,一组,pensize,同心圆,circle 来源: https://www.cnblogs.com/yeu4h3uh2/p/12513783.html