How to Program Fibonacci Sequence Recursively | Python for Math

Wrath of Math August 6, 2022
Video Thumbnail
Wrath of Math Logo

Wrath of Math

@wrathofmath

About

I teach math and rap sometimes. Check out my math fashion brand! mathshion.com

Video Description

We program a recursive function that calculates terms of the Fibonacci sequence in Python. This is a great introduction exercise for recursive programming. We just need to call the previous two terms of Fibonacci to get the next one! #Python #PythonforMath Recursive Factorial in Python: https://youtu.be/UAqnxAiPKtU Check out my code (click "Fork Repl" to open it up and play with the code): https://replit.com/@WrathofMath/Fibonacci-Sequence?v=1 Python for Math playlist: https://www.youtube.com/playlist?list=PLztBpqftvzxUWTfxzaICDNe4UCAQW6sWB ◉Textbooks I Like◉ Graph Theory: https://amzn.to/3JHQtZj Real Analysis: https://amzn.to/3CMdgjI Proofs and Set Theory: https://amzn.to/367VBXP (available for free online) Statistics: https://amzn.to/3tsaEER Abstract Algebra: https://amzn.to/3IjoZaO Discrete Math: https://amzn.to/3qfhoUn Number Theory: https://amzn.to/3JqpOQd ★DONATE★ ◆ Support Wrath of Math on Patreon for early access to new videos and other exclusive benefits: https://www.patreon.com/join/wrathofmathlessons ◆ Donate on PayPal: https://www.paypal.me/wrathofmath Thanks to Petar, dric, Rolf Waefler, Robert Rennie, Barbara Sharrock, Joshua Gray, Karl Kristiansen, Katy, Mohamad Nossier, and Shadow Master for their generous support on Patreon! Thanks to Crayon Angel, my favorite musician in the world, who upon my request gave me permission to use his music in my math lessons: https://crayonangel.bandcamp.com/ Follow Wrath of Math on... ● Instagram: https://www.instagram.com/wrathofmathedu ● Facebook: https://www.facebook.com/WrathofMath ● Twitter: https://twitter.com/wrathofmathedu My Math Rap channel: https://www.youtube.com/channel/UCQ2UBhg5nwWCL2aPC7_IpDQ/featured