fibonnaci module¶
- class fibonnaci.Fibonacci[source]¶
Bases:
object
A class that provides methods to calculate Fibonacci numbers.
- iterative(n)[source]¶
Calculates the nth Fibonacci number using an iterative approach.
Parameters: - n (int): The index of the Fibonacci number to calculate.
Returns: - int: The nth Fibonacci number.