SHARE
TWEET

Fibo en recursif

Carotte Dec 6th, 2019 (edited) 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def fibonacci(n):
  2.     if(n <= 1):
  3.         return n
  4.     else:
  5.         return (fibonacci(n-1) + fibonacci(n-2))
  6. n = int(input("Entrez jusqu a quel nombre on veut:"))
  7. for i in range(n):
  8.     print(fibonacci(i))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top