Jim’s Moving Apple

You may remember Jim’s moving Apple from last week. This includes code showing how to stop the apple moving off to the right side of the screen.
Well, here’s the apple and the code is in the attached PDF:

Moving Apple PDF
Thanks Jim!
PS Take a look at the comments in the code. An example to us all!