2.1 Trace Tables Flashcards
1
Q
What is “Tracing Execution”?
A
A vital skill for understanding program flow and testing the accuracy of an algorithm for logic
2
Q
What do trace tables involve?
A
- Examining a printed extract of program code and running through the program
- Take each line at a time and write out in a trace table the current state of each variable
- Noting down any output the program produces
- Each variable present in the program should have its own column in the trace table
- A new row should be added under any column if the state of a variable changes
3
Q
What are trace tables good for?
A
Tracking down logic errors in a problem