Completing Algorithms
Computer Science: OCR GCSE, topic 2.1.8
Completing Algorithms
Some exam questions will ask you to state the output of an algorithm.

Interpreting the algorithm
- The first step for this type of question is to try to identify what the algorithm does.
- If you can interpret the algorithm, then it will be much easier to follow it.

Trace tables
- You can draw a table with a column for each variable in the algorithm.
- Use this table to record the value of each variable.
- Follow through the code carefully until the end.
- Finally, the trace table should include your answer.
Test yourself on Completing Algorithms
Trace Tables
What do the columns in a trace table represent?
What should a student do before drawing a trace table?
Choose the true statement in each pair.