June 2021
Beginner
336 pages
7h 11m
English

Computers shine when we have them repeat a process over and over. They tirelessly do exactly what we ask, whether it involves doing something 10, 100, or a billion times. In this chapter, we’ll learn about loops, statements that instruct the computer to repeat the execution of part of our program.
We’ll use loops to solve three problems: tracking the location of a ball under a cup, counting the number of occupied parking spaces, and determining how much data is available on a cell phone plan.
In this problem, we’ll track the location of a ball under a cup as the cups move. But the cups can ...