While loops and energy · exercise 1 of 1 · free preview
The game so far · chapter 11
Right now: Pip's battery never drains, which is not how batteries work.
This chapter's mission: Makes Pip's battery drain. Work through the exercises, then your own code brings it to life.
A while loop repeats as long as its condition is true. Something inside the loop must change, or it never ends.
Count down 3, 2, 1 with a while loop, then print Go.