如何在 python 中看到更多的 FIbonacci 螺旋线?
How see more of FIbbonaci spiral in python?
如何在 Python 中看到很多斐波那契螺旋线,但仍然可见?
这是代码:
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)
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)
如何在 Python 中看到很多斐波那契螺旋线,但仍然可见? 这是代码:
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)
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)