PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'''
Fibonacci
I keep seeing people post Fibonacci and I looked it up. After googling what is is, I figured a for loop would handle that so here is mine. Simple, but effective.
https://lordhill.itch.io
'''
a=0
b=1
for i in range(6):
print(a, end=' ') #Print A
print(b, end=' ') #Print B
a=b+a #change A to the next number
b=b+a #change B to the one after that
#Repeat the loop printing the new A, the new B, and then giving A and B their next values
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run