The answer is given below.
The new statements ask the user to enter a value,
and then read the value into a variable called GUESS
.
' LET NUMBER = INT( 30000*RND ) ' pick a random number 0 to 29,999 ' SCREEN 12 FOR DOT = 1 to NUMBER LET X = INT( 640*RND ) ' pick a random column 0 to 639 LET Y = INT( 480*RND ) ' pick a random row 0 to 479 PSET( X, Y) ' draw the random point NEXT DOT ' PRINT "How many spots are there" READ GUESS ' END
The last step is to calculate the user's error and to print the result.
The ERROR
can be calculated by subtracting the number in GUESS
from
the NUMBER
of spots.
After it is calculated, NUMBER
and ERROR
should be printed out.
Add two statements to the program that make it complete.