February 19 - Calculate the Nth Fibonacci Number from a Sequence
This guide walks through how to work with the Fibonacci sequence and return the final from a list of Fibonacci numbers.
Guide Tasks
- Read Tutorial
- Watch Guide Video
- Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license
Already a Bottega Student? Sign In
Summary
Build a method that returns the nth Fibonacci number.
Exercise Description
Build a method that takes in a number, that represents n
, and returns the nth
Fibonacci number in the sequence.
Sample Input
nth_fibonacci 10
Expected Output
89
Real World Usage
The Fibonacci sequence is critical for a number of algorithm implementations, this guide walks through how to pick out specific Fibonacci numbers.