This is a presentation of Chapter 4 of the "Introduction to Python & Programming" book that accompanies the coding course in the Bachelor program at WHU - Otto Beisheim School of Management in Germany in the spring semester 2020.
In this video, I talk about:
How a function that calls itself implements the concept of a recursion
How a recursion solves problems in a "backwards" fashion
What happens when a recursion does not end up in its base case
What duck typing means
How type checking and input validation can harden a function against bad input
How the while statement provides generic ways of looping
Why the for statement is only a special case of the while statement
What kind of syntactic sugar exists that makes looping even nicer
How an indefinite loop can be used to process user input
Examples introduced: The factorial of a number, the greatest common divisor of two numbers, and Fibonacci numbers
PYTHON BOOK
The lecture is based on the free book "Introduction to Python & Programming".
Get it on GitHub: https://github.com/webartifex/intro-t...
PYTHON LECTURES
Find all the video recordings of the book in this playlist: • Intro to Python & Programming (Spring 2020...
SUBSCRIBE
If you like the way I teach and talk about programming and data science, subscribe to this channel.
The videos focus on coding courses and tutorials aimed at managers and students of business administration, enabling them to make better decisions with analyses done in code.
INSTRUCTOR
Alexander Hess, PhD Student
WHU - Otto Beisheim School of Management, Vallendar, Germany
CONTACT
GitHub: https://github.com/webartifex
LinkedIn: / webartifex
XING: https://xing.to/webartifex
Facebook: / webartifex
Instagram: / webartifex
Website: http://www.webartifex.biz
YouTube: / webartifex
wa-vid-012