WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Algorithms and Programs
Dry running, trace tables and test data
- 3 things to know
- AS Unit 1
Overview
What a programmer does when carrying out a dry run, trace table and test data.
What you need to know
Answer each one before you reveal it.
What is a trace table, and what does each column hold?
Name the three kinds of test data.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Describe what a programmer does when carrying out a dry run.
Model answer
The programmer works through the algorithm by hand one statement at a time, writing down the value of every variable as it changes, without executing it on a computer.
- 2
What is a trace table, and what does each column hold?
Model answer
A trace table records a dry run as a grid, with one column for each variable and for any output, and one row for each step of the algorithm.
- 3
An algorithm reads: total ← 0; FOR i ← 1 TO 4; total ← total + i × i; NEXT i; OUTPUT total. State the value output and the value of total after each pass.
Model answer
The output is 30, and total holds 1, then 5, then 14, then 30 after the four passes.
- 4
A list holds 5, 3, 8, 1 and one complete pass of a bubble sort is carried out. State the order of the list afterwards.
Model answer
The list becomes 3, 5, 1, 8, because 5 and 3 are swapped, 5 and 8 are left alone and 8 and 1 are swapped.
- 5
Ten values are held in positions 1 to 10 but the loop is written FOR i ← 1 TO 9. Describe the effect on the total calculated.
Model answer
The tenth value is never added, so the total is short by that value and the fault shows only when the last item is not zero.
- 6
An array is indexed from 0 to 9 but is processed by a loop written FOR i ← 1 TO 10. Describe the two faults this causes.
Model answer
The item at index 0 is never processed, and the attempt to reach index 10 is outside the array and causes the program to fail.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Algorithms and Programs, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.