I demonstrate how to perform input validation in Python using a while loop.
Here's the basic algorithm:
Ask for some input
while the input is something we don't like:
Tell the user there something wrong
Ask for the input again
Continue on with the rest of the program
// Check out a C++ version of this video:
https://youtu.be/mZPSZt2Ye2Q
// Learn More //
Watch my Python play list:
https://www.youtube.com/playlist?list=PLaatXkJEXKyKzr_4Tk2D1PTnPo_Lul5Af
Nested loops examples:
https://youtu.be/N95mQO4F9qA
https://youtu.be/HVqcW9k9RPU
The Python for loop:
https://youtu.be/TkwiQcSYqAw
Introducing the while loop:
https://youtu.be/V526jlrVEOM
// Consider supporting this channel in multiple ways
https://paypal.me/hankstalica1
Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB