Chapter 7 prime numbers exercise