-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiVisual.py
More file actions
49 lines (39 loc) · 786 Bytes
/
fiVisual.py
File metadata and controls
49 lines (39 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import turtle
import time
wn = turtle.Screen()
wn.bgcolor("black")
# catetos
linha = turtle.Turtle()
linha.color("grey")
linha.hideturtle()
linha.speed(0)
linha.left(90)
linha.forward(1000)
linha.goto(0,0)
linha.left(90)
linha.forward(1000)
linha.goto(0,0)
linha.left(90)
linha.forward(1000)
linha.goto(0,0)
linha.left(90)
linha.forward(1000)
for c in range(0, 20):
linha.goto(0, 10)
linha.dot(10, "white")
# circulo
bola = turtle.Turtle()
bola.color("white")
bola.hideturtle()
# fibonacci
contador = 0
fibonacci = [0, 1]
for c in range(0, 20):
contador += 1
soma = fibonacci[contador - 1] + fibonacci[contador]
fibonacci.append(soma)
contador = 0
for ce in range (0, 20):
contador += 1
term = fibonacci[contador - 1]
bola.circle(term, 90)