barry richard wrote:Thanks for your answers guys
Jeff, when I run your code
I still get
Yes, I know. That's what it's supposed to do. It's your code, with print statements added, so that you can see where you're going wrong. Look at it closely. Make sure you understand how the for loop control corresponds to the output we're seeing.
In particular, note that an array of length 3 has indices 0, 1, and 2. If it had index 3, it would have a lenght of 4.