- How did you find the reading?
- Do you have any questions about anything in there?
Q: What would the output of this program be? Q: There are 6 steps in this program. What would be on the list at each step?
add 4
add 5
showNumber
add 6
remove
add 7
A: Output is 5. The list at each step looks like:
add 4 // List = 4
add 5 // List = 4 5
showNumber // List = 4 5
add 6 // List = 4 5 6
remove // List = 4 5
add 7 // List = 4 5 7
Q: How would you write a program which makes the list 4 9 10 20
?
add 4
add 9
add 10
add 20
Q: How would you output the individual letters of the word 'cab'.
A:
add 3
showLetter
add 1
showLetter
add 2
showLetter
Students should get through these with minimal prompting. Look for them working step-by-step, talking about what's in the list after each instruction is run. They should be referring back to the overview in the writing for definitions of the instructions - point them in that direction if they have forgotten what some of the instructions do.