PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
Here another code to count Fibonacci numbers.
"""
from itertools import count
x = 0
y = 1
z = int(input())
#print('Fibonacci numbers: ')
#print(x,end=" ")
fib = []
#fib.append(x)
for w in count():
if y >= z:
break
w = y
y += x
x = w
fib.append(w)
print(len(fib),"Fibonacci numbers between 1 - 9999999999999999999999999")
print(fib)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run