Trace Tables Flashcards

1️⃣ Familiarise yourself with the flashcards:

  • Look through all the flashcards to see what's on both sides.
  • Make sure you understand the information on each card. If something's unclear, click the link to the revision notes at the bottom of the page for more details.

2️⃣ Test yourself:

  • Look at the question or prompt on each card and try to remember the answer before flipping it over.
  • Check the answer and make a note of any cards you find challenging and need to go over more.

3️⃣ Consistently Review and Practice:

  • Use spaced repetition: spend more time on the cards you struggle with and go over them more often.
  • Regularly review all the flashcards to help you better understand and retain the information over time.

Note: We may include questions that have multiple correct answers. It's useful to remember specific examples to understand these concepts better.

PERSONALISED 1-TO-1 TUTORING

Need more help on this topic? Get 1-to-1 support

Get support with clear explanations, practice and feedback (Ages 5 to 16).

  • DBS-checked tutors
  • Flexible times
  • Parents can be updated

Want an ad-free experience? Subscribe to remove ads

What is a trace table in computer science?

A table that shows how variable values change step by step in an algorithm.

Why do we use a trace table?

To test an algorithm by hand, check outputs, and find logic errors before running code.

What does each column in a trace table usually represent?

A variable, an output, or a condition (True/False) that you want to track.

What does each row in a trace table show?

One step of the algorithm in order, including each pass of a loop.

What should you write in the first row before the algorithm runs?

The starting values of all variables and the chosen inputs.

When a line assigns x = x + 1, what value do you record?

The new value after the line runs, not the old one.

How do you record an IF condition in a trace table?

Add a column for the condition and write True or False at that step.

How do you trace a loop in a trace table?

Repeat rows for each pass and record the loop counter or index each time.

When should you record outputs in a trace table?

When an output or print happens, write the value in an Output column.

What common mistake can a trace table help find?

Off-by-one errors, such as looping one time too many or too few.

How can you trace values in a list or array?

Record the index used and the value at that index, or add columns for key items.

How is a trace table different from a truth table?

A trace table follows a program step by step; a truth table lists results for all True/False input combinations.