Challenge: Compute Sum of N Fibonacci Numbers
Compute the sum until the Nth Fibonacci number, starting from 1 up to N in this exercise.
We'll cover the following
Problem statement
In Mathematics, the Fibonacci sequence or series is defined as a series of numbers in which each number is the sum of the two preceding numbers. The simplest is the series , etc.
- In the given
findTheSum
function, the numbern
is passed as an argument wheren
represents the number of Fibonacci numbers starting from 1 that we want to compute the sum of.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy