Apprentice coder

PeterH:

Pedro147:
did the trick.

The latest code you posted is still running off the end of the array. It might run and look OK, but it's not right yet.

Can you offer any suggestions as to how I can fix this problem, because I prefer not to labour under any misapprehensions that the code is correct. Thanks PeterH.