Shoot the Ball on the Cartesian Plane

Enter in the x and y coordinates of where the ball is and the computer will tell you whether you hit it or not. Had to use several delays to allow variables to get their values before they were checked.

The code for the X which checks if it hits the ball

The code for the ball which appears in a random place but avoids lower left side of screen where the narrator is.