import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.fd(-250) turtle.pendown() turtle.pensize(25) turtle.pencolor("purple") turtle.seth(-40) for i in range(4): turtle.circle(40,80) turtle.circle(-40,80) turtle.circle(40,80/2) turtle.fd(40) turtle.circle(16,180) turtle.fd(40*2/3) turtle.down()
北理工慕课
import turtle turtle.setup(3000,3000,0,0) x=list(range(500)) for i in x: turtle.left(20) turtle.fd(0.5*i) turtle.down() 自己胡乱写的好像可以画出来接近圆形啊哈哈 left() 参数60时候,是个正六边形
import turtle turtle.setup(3000,3000,0,0) x=list(range(500)) for i in x: turtle.left(314) turtle.fd(100) turtle.down() 圆形,
import turtle
turtle.setup(3000,3000,0,0)
x=list(range(115))
for i in x:
turtle.left(3.1415926)
turtle.fd(10)
turtle.down()
真正的圆形
import turtle
turtle.setup(3000,3000,0,0)
x=list(range(500))
for i in x:
turtle.left(514)
turtle.fd(100)
turtle.down()
七角星