
Algorithmic Thinking ◾ 149
the current temperature of the steak. Of course, the current temperature of
the steak will increase with the amount of time that the steak remains on
the grill. e loop is controlled by the logical condition “steakTemp < 135”
and the repeated action is expressed as “steakTemp ← steakTemp + 13”. In
other words, the loop repeatedly increases the steak temperature in incre-
ments of 13 degrees until the minimum desired temperature is attained.
We can gain further insight into the meaning of a while loop by list-
ing the sequence of individual actions that occur when the algorithm is
actually executed by a computer ...