Try a free question Browse topics Course access

National 5 Computing Science

Learn to design, trace, test and debug programs, investigate computer systems, and develop database and web solutions.

Start with one topic, try a mix of questions or choose a short exam-style set. If we can't check an answer reliably, we'll tell you.

Question paper: 80 marks in 1 hour 30 minutes. Assignment: 40 marks, 6 hours. Weighting: two thirds and one third. Official specification.

Use the practice cases and data to prepare for assignments. Follow your teacher's instructions for assessed work and supervised practical work.

Choose a topic

Software design and development 5 topics
Computer systems 6 topics
Database design and development 3 topics
Web design and development 4 topics

Learn · Guided practice

Start with a guided question

Choose an answer and use the explanation to build the skill. Then try the independent task below.

What final total does the loop produce?

The total starts at 0. The loop visits each row once, in index order, and adds the number in the Value column to the total.

Trace a running total
IndexValue
04
110
211

Choose an answer to see its feedback.

21

Try again. 10 + 11 gives 21. The loop also visits the first value, 4.

25

Correct. 0 + 4 + 10 + 11 = 25.

11

Try again. 11 is the last value visited. The loop adds each value to the running total.

View access to National 5 Computing Science

Try independently

Tracing and repairing a program

Question-paper skills · software design and development

Use the original pseudocode shown in the source. Array indexing starts at 0. The intended program adds only values greater than 10. The loop visits every value once.

This is an original practice task. Write or make your own response before opening the guide. The practice marks show the depth expected; they are for self-review, not an automatic exam grade.

Original pseudocode
values ← [12, 5, 8] total ← 0 FOR index FROM 0 TO 2 total ← total + values[index] END FOR

Your notes in these boxes are temporary and are not saved to course progress. Keep a copy before leaving.

For drawings, practical files or performances, use your own suitable materials or software.

Open the response and review guide

Part 1 · 1 practice mark

12 + 5 + 8 = 25.

  • 1 mark: 25.

Equivalent accurate wording and valid alternative methods are welcome.

Part 2 · 2 practice marks

Inside the loop: IF values[index] > 10 THEN total ← total + values[index] END IF. The corrected final total is 12.

  • 1 mark: A condition tests the current value > 10.
  • 1 mark: The addition happens only when that condition is true; other loop behaviour preserved.

Equivalent accurate wording and valid alternative methods are welcome.

Part 3 · 1 practice mark

With total initially 0 and a single input of 10, total should remain 0.

  • 1 mark: 10 should not be added, or 11 should be added, with a correct expected effect.

Equivalent accurate wording and valid alternative methods are welcome.

A different valid response can meet the criteria. Discuss uncertain credit with your teacher; this guide does not mark it wrong.

Official course and assessment specification