Corsi
AccediInizia a imparare l'IA
Corsi
AccediInizia a imparare l'IA
+ 1

How to make a simple program on fibnocci no in python

python
4th Sep 2018, 12:56 AM
Naveen
Naveen - avatar
2 Risposte
+ 3
Recursive: n=int(input()) def fib(m): if m in [0,1]:return m return fib(m-1)+fib(m-2) print(fib(n))
4th Sep 2018, 1:01 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
non recursive: https://code.sololearn.com/cwwMCakp1rYd/?ref=app
4th Sep 2018, 2:53 AM
JME

Hai spesso domande come questa?

Impara in modo più efficiente, gratuitamente:

  • Introduzione a Python

    7,1M studenti

  • Introduzione a Java

    4,7M studenti

  • Introduzione a C

    1,5M studenti

  • Introduzione a HTML

    7,5M studenti

Vedi tutti i corsi
Popolare oggi
Ошибка в приложении Sololearn
1 Votes
Is anyone else experiencing this Sololearn issue?
0 Votes
NEO V2.0
1 Votes
Sololearn course
1 Votes
solo learn program issue - iPhone?
1 Votes
Is it possible to write Rust code that is as compact and expressive as Python?
0 Votes
Best language?
0 Votes
Bug sur le deuxième cours de python
1 Votes
I am learning javascript intrmdt but when I play a code challenge. The app is givin me comlecated questions with less time.why?
0 Votes
Learn - multiple choice course questions display in one box making it impossible to continue
1 Votes