+ 1

Ответ на задачу Фибоначчи

Фибоначчи

4th Dec 2020, 3:21 PM
Ксения Пивоварова
3 ответов
+ 8
num = int(input()) def fib(n): a, b = 0, 1 for i in range(n): yield a a, b = b, a + b gen = fib(num) for i in range(num): print(next(gen))
4th Dec 2020, 3:22 PM
Ксения Пивоварова
+ 6
4th Dec 2020, 4:21 PM
Piyush
Piyush - avatar
4th Dec 2020, 4:42 PM
JaScript
JaScript - avatar