In this video, I show how we can use an indefinite loop (i.e. a "while True" loop) to write an interactive guessing game where the player will play as many rounds as needed to guess correctly. In such cases, we cannot predict how many iterations will be in the loop and thus need to use a "while True" loop. Then, we see how we can use the "continue" and "break" statements to control how the loop iterates. Also, I emphasize the importance of a modular design when writing more "complex" code.
PYTHON BOOK
The lecture is based on the free book "Introduction to Python & Programming".
Get it on GitHub: https://github.com/webartifex/intro-t...
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-052