...

/

Failed Attempt: Shadowing

Failed Attempt: Shadowing

We'll cover the following...

Let’s try to use the tools we already have in our toolbox to make a while loop that exits. We’ll create a variable, keep_going. It will start off as true, and then we’ll make the variable equal to false inside the body of the while using name shadowing. As a reminder, name shadowing lets us create a new variable with the same name as the one before, e.g.:

Access this course and 1400+ top-rated courses and projects.