Give a number N, print alternate fibonacci numbers till n-th Fibonacci. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
- 2

Give a number N, print alternate fibonacci numbers till n-th Fibonacci.

Python code

25th Apr 2022, 4:35 PM
Vishal baghel
3 ответов
+ 2
Vishal baghel , your code seems to work quite good. so where is your question or issue?
25th Apr 2022, 5:06 PM
Lothar
Lothar - avatar
+ 1
Where is your code?
25th Apr 2022, 4:39 PM
JOKER
JOKER - avatar
0
n = int(input()) myList = [0,1] for i in range(2, n): myList.append(myList[i-1] + myList[i-2]) print(myList)
25th Apr 2022, 4:40 PM
Vishal baghel