Validation, verification and trace tables
Introduced| English | Meaning |
|---|---|
| validation/ˌvælɪˈdeɪʃn/ | Checking whether data meets specified rules for acceptable values or format. |
| verification/ˌverɪfɪˈkeɪʃn/ | Checking that entered or copied data match the original source, rather than proving that the source itself is true. |
| trace table/treɪs ˈteɪbl/ | A table recording variable values, conditions or outputs while an algorithm is followed step by step. |
| range check/reɪndʒ tʃek/ | A validation test that checks whether a value lies within specified permitted limits. |
| length check/leŋθ tʃek/ | length check |
| presence check/ˈprezəns tʃek/ | presence check |
| test data/test ˈdeɪtə/ | Inputs chosen to check how a program behaves, including valid values and values it should reject. |
Checking and tracing
- When data is entered, we check it to reduce mistakes.
- Validation 验证 checks it is sensible; verification 核实 checks it was copied correctly.
- A trace table 追踪表 follows an algorithm step by step.
Validation
- Validation checks data is sensible and follows the rules (it can't check the data is true).
- Range check 范围检查 (between limits), length check 长度检查 (right number of characters), type check (right kind of data), presence check 存在性检查 (not blank), format check (right pattern, e.g. dd/mm/yyyy), and a check digit (an extra digit confirming a number).

Every algorithm decomposes into input, processing and output — here, finding the average of three marks.
Checking that an age is between 0 and 120 is a:
Difficulty 1/5 · 100 coins + a small bonus on first completion today
A range check confirms a value lies within allowed limits.
Match each validation check to its purpose.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
Presence = not blank; type = right kind of data; format = right pattern.
Verification
- Verification checks data was copied or entered correctly (no typing mistakes).
- Visual check — a person compares the typed data with the original.
- Double entry — the data is entered twice and the two copies are compared.

Linear search checks each item in turn from the start until it finds the value.
Validation checks that data is sensible (in range, right type, not blank), while verification checks it was copied or entered correctly (e.g. double entry).
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Validation = "is it sensible?"; verification = "was it entered/copied correctly?" — you usually want both.
Entering data twice and comparing the two copies is:
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Double entry is a verification method — the two copies must match.
Trace tables and test data 测试数据
- A trace table records each variable's value as an algorithm runs — to check it works or to find out what it does.
- Test data types: normal (accepted), abnormal (rejected), extreme (largest/smallest allowed), boundary (the values on each side of a limit, e.g. 120 and 121).

A trace table records each variable's value as the program runs
Fill in a trace table
A trace table follows the variables one line at a time. Step through and watch the counter and the running total change — exactly the skill a trace-table exam question tests.
A trace table is used to:
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Tracing helps you check an algorithm works, or work out what it does, by following the variables.
Trace total = 0; FOR i = 1 TO 5: total = total + i. What is total at the end?
Difficulty 2/5 · 140 coins + a small bonus on first completion today
1+2+3+4+5 = 15 — the value the trace table builds up row by row.
You've got it
- validation = is it sensible? (range, length, type, presence, format, check digit)
- verification = was it copied correctly? (visual check, double entry)
- a trace table tracks variable values step by step
- test data: normal, abnormal, extreme, boundary