Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Python Basics!
You have completed Python Basics!
Preview
Repeating things in code is a frequent need. "while" repeats code until an expression is no longer True. Let's explore how to use it.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
If I think about my day today,
I've already used a few of these loops.
0:00
In the shower this morning,
while there was soap on my body, I rinsed.
0:03
Afterwards, while I was wet,
I dried my body.
0:07
There's two loops and
I was just waking up.
0:10
Then while my coffee cup was empty,
I filled it, once my cup was full,
0:13
I stopped pouring, while there was cereal
left in my bowl, I took some bites.
0:18
Loops occur all the time in all
applications that we build,
0:23
while data is loading,
show that waiting spinner.
0:26
While the deal that will expire eventually
hasn't yet, update the countdown clock.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up