Change ColorNumber to a random integer 0 through 15.
COLOR INT( RND * 16 )
Since RND is at most slighly less than one,
RND * 16 will be at most 15.99999.
INT will change that to 15.
So INT( RND * 16 ) is at most 15.
(And is at minimum a zero.)
That is the end of this chapter. You may wish to review the following. Click on a subject that interests you to go to where it was discussed.
FOR loop.
PSET statement.
RND statement.
INT statement.
The next chapter
starts a new topic: that of arrays.
FOR loops will be very useful for programs that use arrays.