Advertisement
Anastasiiauser

Untitled

Dec 6th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def fibonacci(n):
  2.     if n <= 1:
  3.         return n
  4.     else:
  5.         return (fibonacci(n-1) + fibonacci(n-2))
  6. n = float(input('n = '))  
  7. print(fibonacci(n))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement