Fibonacci By CodeBoi on 08 Nov 2023 04:16 pm
Language: Python
def fib(n):
  if n <= 3:
    return max(1, n)
  return fib(n - 1) + fib(n - 2)

for i in range(15):
  print(fib(i))

0 likes

Login to post comments

Comments

zoclhas's Profile Picture

By zoclhas

should add user input for range fr