Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Here's my approach to solving this challenge.
This video doesn't have any notes.
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
Welcome back, how'd you do?
0:00
Don't worry if you weren't able to
complete all of the to do tasks,
0:03
that's completely okay.
0:06
Learning new things can be a challenge.
0:08
Let me show you my approach
to this particular challenge.
0:11
We were given the name
variable with input.
0:14
Our first to-do asks the user by name
if they understand Python while loops.
0:17
We can do this in a similar
fashion to our name statement.
0:21
We can use string formatting to add
a bit of personalization to it as well.
0:25
We should also add a prompt for
what the user should enter, and
0:29
put that on a new line.
0:33
So I have understanding equals input,
string formatter, and
0:35
do you understand Python while loops.
0:40
Backslash m for a new line and
what they should enter and
0:42
we pass in the name variable
here into our string formatting.
0:46
For our next to do task,
I'll convert the input to lower case so
0:50
that an upper case yes is accepted too.
0:53
Our next task The next to-do we
0:57
ask the user again for input about whether
or not they understand while loops now.
1:02
And our final to-do outside the while loop
1:07
we congratulate the user for
understanding while loops.
1:12
And that's it.
1:15
I hope this didn't make you too loopy.
1:16
Great job completing
this practice session.
1:19
Thanks for working through it with me.
1:22
Until next time, happy coding.
1:24
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