Exercises - Using Compound Variables and Stems
- After these assignment instructions, what is displayed in the
following SAY instructions?
a = 3 /* assigns '3' to variable 'A' */ b = 4 /* '4' to 'B' */ c = 'last' /* 'last' to 'C' */ a.b = 2 /* '2' to 'A.4' */ a.c = 5 /* '5' to 'A.last' */ x.a.b = 'cv3d' /* 'cv3d' to 'X.3.4' */- SAY a
- SAY B
- SAY c
- SAY a.a
- SAY A.B
- SAY b.c
- SAY c.a
- SAY a.first
- SAY x.a.4
- After these assignment instructions, what is displayed?
hole.1 = 'full' hole. = 'empty' hole.s = 'full'- SAY hole.1
- SAY hole.s
- SAY hole.mouse
ANSWERS
- 3
- 4
- last
- A.3
- 2
- B.last
- C.3
- A.FIRST
- cv3d
- empty
- full
- empty