import time
import turtle
a = turtle.Turtle()
x = 0
y = 0.01
while 0==0 :
a.forward(y)
x = x + y
a.left(90)
a.forward(x)
y = x + y
a.left(90)
time.sleep(0.02)
1 个答案:
答案 0 :(得分:2)
import time
import turtle
a = turtle.Turtle ()
x = 0
y = 10
factor = 0.55
while True:
a.forward (y)
x = factor * (x + y)
a.left(90)
a.forward (x)
y = factor * (x + y)
a.left (90)
time.sleep (0.02)