asked 27.7k views
5 votes
You can write a function to find Fibonacci numbers using recursion.

How do you find the next number?


add five to the previous number

add one to the previous number

multiply the two previous numbers

add the two previous numbers

asked
User Manan
by
8.1k points

1 Answer

4 votes

Answer:

Add the two previous numbers

Step-by-step explanation:

A recursive definition of the Fibonacci sequence would look like this, in python:

def fibonacci(n)

if n <= 1:

return n

else:

return(fibonacci(n-1) + fibonacci(n-2))

answered
User TrueinViso
by
8.5k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.