When you don't know how many times to repeat something, how does a `while` loop keep running until its condition finally turns false?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Mentally execute this loop and predict the final value of total after it finishes:
n = 3 total = 0 while n > 0: total = total + n n = n - 1
Assign that final value to final_total.
The Lost Woods and unknown repeat counts
Describe the Lost Woods task, where the user may answer right any number of times, and write out how deeply nested if/else code would have to be stacked to handle it.
while syntax and its check-run-recheck cycle
Write the while <condition>: form with its indented block, then trace the order in which Python checks the condition, runs the block, and re-checks, and where control resumes at exit.
The non-terminating loop pitfall
State the condition under which a while loop keeps running forever, and write a short loop whose body leaves the variable in its condition untouched.