Exercises - Using Compound Variables and Stems

  1. After these assignment instructions, what do the following SAY instructions produce?
    a = 3 /* assigns '3' to variable 'A' */
    d = 4 /* '4' to 'D' */
    c = 'last' /* 'last' to 'C' */
    a.d = 2 /* '2' to 'A.4' */
    a.c = 5 /* '5' to 'A.last' */
    z.a.d = 'cv3d' /* 'cv3d' to 'Z.3.4' */
    1. SAY a
    2. SAY D
    3. SAY c
    4. SAY a.a
    5. SAY A.D
    6. SAY d.c
    7. SAY c.a
    8. SAY a.first
    9. SAY z.a.4
  2. After these assignment instructions, what output do the SAY instructions produce?
    hole.1 = 'full'
    hole. = 'empty'
    hole.s = 'full'
    1. SAY hole.1
    2. SAY hole.s
    3. SAY hole.mouse
ANSWERS
    1. 3
    2. 4
    3. last
    4. A.3
    5. 2
    6. D.last
    7. C.3
    8. A.FIRST
    9. cv3d
    1. empty
    2. full
    3. empty


dfhrx00059.html | Timestamp icon Last updated: Monday, 5 June 2017