= 5
n print(f"Fibonacci number {n} is equal to {fib(n)}")
Fibonacci number 5 is equal to 5
Write a function that computes the nth Fibonacci number. Your function should be called fib()
and should take as input a single integer value n, and should return a single integer value representing the nth Fibonacci number.
Go by the definition of \(F_{n}\) here.
Test your code against the following inputs:
Fibonacci number 100 is equal to 354224848179261915075