Advertisement
Alinchik

Untitled

Jul 26th, 2019
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. def FibRec(k):
  2.     if k == 1:
  3.         return 0
  4.     if k == 2:
  5.         return 1
  6.     return FibRec(k - 2) + FibRec(k - 1)
  7.  
  8.  
  9. print(FibRec(15))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement