Skip to content

This is a simple fibonacci number generator that takes an integer input from a user, then uses that input as the term of the fibonacci number to be generated. This program utilizes recursion and memoization (caching) to efficiently compute Fibonacci numbers.

License

Notifications You must be signed in to change notification settings

m3mentomor1/Fibonacci_Number_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Fibonacci Number Generator

🧐 I. Overview

This is a simple fibonacci number generator that takes an integer input from a user, then uses that input as the term of the fibonacci number to be generated. This program utilizes recursion and memoization (caching) to efficiently compute Fibonacci numbers.


📦 II. Dependencies

  • functools - this module is used for the lru_cache decorator applied to the recursive function f(n). This decorator caches computed Fibonacci numbers, improving efficiency by avoiding redundant computations. What it does is store recent function calls and reuse results for the same inputs.

⏯️ III. Demo

gif


🛠️ IV. How to use this repository?

Method 1: Clone repository

1. Create a copy of this repository:

git clone https://github.com/m3mentomor1/Fibonacci_Number_Generator.git

2. Go to the repository's main directory:

cd Fibonacci_Number_Generator

Method 2: Fork repository

Click the Fork button at the top right corner of this page to create a copy of this repository in your GitHub account.

About

This is a simple fibonacci number generator that takes an integer input from a user, then uses that input as the term of the fibonacci number to be generated. This program utilizes recursion and memoization (caching) to efficiently compute Fibonacci numbers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages