Python: While Loops (Reading User Input Indefinitely?!!)
Afternerd Afternerd
21.5K subscribers
12,128 views
0

 Published On Oct 21, 2021

In this video in the Python tutorial for beginners, I am going to teach you all you need to know about While Loops in Python by going through an example where a user has to interactively enter multiple numbers indefinitely, and we only stop when the input is a negative number.

I will discuss why we need while loops in programming, and the difference between For loops and While loops.

⏰ Timestamps:
00:00 | Introduction
00:15 | Brief summary of For loops
01:05 | When should you use a While loop
02:30 | While loop syntax in Python
06:23 | A simple While loop example
09:56 | An advanced While loop example
13:39 | Summary

Resources:
📝 Python Cheatsheet: https://www.afternerd.com/blog/get-py...
🖥️ Computer Science guide: https://www.afternerd.com/blog/learn-...
🐍 Python roadmap guide: https://www.afternerd.com/blog/learn-...

Courses:
📚 Python OOP: https://www.afternerd.com/udemy/pytho...

Where you can find me:
ℹ️ Website: https://www.afternerd.com/​
📸 Instagram:   / the_kreamix​  
🐦 Twitter:   / afternerdtweets  

#python #pythonforbeginners #pythontutorial #afternerd

show more

Share/Embed