LogicDecode / hactoberfest2023

Pull request best of your code snippets to help open source community
MIT License
10 stars 142 forks source link

Update fibonacci.py #70

Closed Nikhil18Patil closed 11 months ago

Nikhil18Patil commented 11 months ago

This code calculates the Fibonacci sequence using a loop and two variables (a and b) to keep track of the current and next Fibonacci numbers. """It is more efficient than the recursive approach for larger values of terms."""