The Challenge1:58 with Ken Alger
Let's discuss the tasks we need to cover for this review of Python while loops.
[MUSIC] 0:00 Howdy, Ken here. 0:09 In this Python practice session, 0:10 you'll get a chance to practice working with While Loops. 0:12 It reinforces what you've learned. 0:15 If you find this practice session too challenging to complete, 0:17 you might need to review a few videos. 0:21 I've put a few links in the teacher's notes for some resources. 0:23 We'll be using workspaces for this practice. 0:26 Go ahead and open up the attached workspace. 0:29 Inside, looping.py, there's some starter code. 0:32 The starter code includes some TODO tasks for you to complete. 0:35 The task at hand is to ask someone if they understand While Loops. 0:39 While they answer no, you print out an explanation of while loops. 0:44 If they answer yes, you print out a nice message, 0:49 thanking them for learning about while loops. 0:51 Let's see it working in action. 0:54 Give ourself some space here Looping.py. 0:57 I'm asked for my name, my name is Ken. 1:05 And then if I understand while loops in Python. 1:10 And look at that, the prompt even uses my name. 1:13 If I answered no to the question, or actually anything other than yes, 1:16 again a message explaining Python while loops. 1:22 It then asks me again, using my name, if I understand while loops. 1:25 As long as I keep answering no, I get the same message. 1:31 When I enter yes, I get a nice message and the program ends. 1:36 Don't worry if you get stuck along the way. 1:42 I've included some links in the teacher's notes to videos that cover the concepts 1:44 needed to complete this practice session. 1:48 When we get back together, I'll walk you through how I did this challenge. 1:51 See you then, and happy coding. 1:55
You need to sign up for Treehouse in order to download course files.Sign up