Advertisement
STANAANDREY

LSD3 2

Oct 14th, 2022 (edited)
924
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. def fib(n):
  2.     if n == 0:
  3.         return 0
  4.     elif n == 1:
  5.         return 1
  6.     else:
  7.         return fib(n - 1) + fib(n - 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement