ANSWERS TO SELF TEST ON CHAPTER 6
1. It is not easy to think of many different variable names for storing the data. If you can think of
enough names, every one has to be written in a LET statement or a READ statement if you do
not use arrays.
2. A number called the subscript, is part of an array variable name. All the variables in an array
share one name but each has a different subscript.
3. You must 'declare' an array giving its size (dimension) in a DIM statement usually placed near the
beginning of a program before the declared array is used.
4. The distinguishing number of an array variable is called the subscript.
5. Houses in a street share the same street name but each has its own number.
Beds in a hospital ward may share the name of the ward but each bed may be
numbered.
Cells in a prison block may have a common block name but a different number.
Holes on a golf course, e.g. the fifth hole at Royal Birkdale.
6. A FOR loop terminates when the process corresponding to the last value of the loop variable has
been completed.
7. A FOR loop's name is also the name of the variable which controls the loop.
8. The two phrases for this variable are 'loop variable' or 'control variable'.
9. The values of a loop variable may be used as subscripts for array variable names. Thus, as the
loop proceeds, each array variable is 'visited' once.
10. Both FOR loops and REPeat loops:
a. have an opening keyword:
REPeat , FOR
b. have a closing statement:
END REPeat name, END FOR name
c. have a loop name.
Only the FOR loop has
d. a loop variable or control variable. (four points)
CHECK YOUR SCORE
This test is more searching than the previous ones.
15 or 16 is excellent. Carry on reading.
13 or 14 is very good but think a bit more about some of the ideas. Look at programs to see how they
work.
11 or 12 is good but re-read some parts of chapter six.
8 to 10 is fair but re-read some parts of chapter six and do the test again.
Under 8 You should re-read chapter six carefully and do the test again.