change range() bounds in chapter 5

Changed the range(1, 3) examples to range(1, 4). The example output matches range(1, 4), and changing it this way feels better than having the loop only go through 1 and 2.