To write any but the most elementary programs, you need to be able to make decisions. Programmers have a special term for decision-making abilities: control structures. A control structure determines whether a computer will turn left or turn right, in other words, whether it will continue to operate on a set of data or exit out of a loop.
This chapter explores some of the basics of decision-making and looping within Python.
Looping with while
Breaking from a loop
A Python guessing game, illustrating these ...