Twenty one dots will be drawn vertically in a column.
The FOR
statement in the program
FOR Y = 0 TO 100 STEP 5
sets Y
to 0, 5, 10, 15, ... 90, 95, 100.
There are 21 values of Y
in all and so
there will be 21 dots on the screen,
at locations
(320, 0), (320, 5), (320, 10), (320, 15), ... (320, 90), (320, 95), and (320, 100).
In the reduced-size image (above) the dots are not evenly spaced, but on the full-sized screen they are five pixels apart.
How many values of Y does the following FOR statment pring?
FOR Y = 5 TO 100 STEP 5 PRINT Y NEXT Y