Learn in your language
Skip to content
IGCSE · Cambridge (CIE) · 0984

Write and amend an algorithm from a scenario

Translate a requirement into precise pseudocode, program code or a flowchart and test the result iteratively.

Cambridge IGCSE Computer Science 0984 · Algorithm design and problem-solving · 2026–2028 Version 4 · 0984 (9–1) · 7
Exam scope and assessment notes

This sequence follows Cambridge IGCSE Computer Science 0984, 2026–2028 syllabus Version 4. It covers subject content Topic 7 only. The separately published 2029–2031 syllabus is not mapped here. Practice is original, self-checked and does not award an official Cambridge grade. Full timed papers and human subject-teacher review remain outstanding. Cambridge states that 0984 has the same 2026–2028 subject content as 0478, with 9–1 grading. In June and November, Cambridge lists 0984 in Administrative zone 3 and for centres in Oman and the UAE. Confirm availability for your centre and exam series with Cambridge International. The separately published 2029–2031 syllabus changes to Python 3 only and removes pseudocode; this 2026–2028 route does not cover those changes.

Before you begin

  • No programming language is required. Be comfortable with place value and multiplication; each lesson introduces the computer-science notation it uses.

Work on paper. Try each question before revealing help, and explain why your method works.

Quick readiness check

What should happen after an algorithm is amended?

What you will learn

  • Select a suitable design representation
  • Write ordered steps that satisfy a scenario
  • Test and amend the algorithm

A complete algorithm joins requirements and control flow

Start from the scenario's inputs, rules and expected outputs. Decompose the work into clear steps, then express the algorithm in pseudocode, program code or a flowchart as requested.

Apply and check the rule

Make conditions, loops, variable updates and outputs precise. Follow the official paper requirements: Paper 2 normally expects pseudocode, while the 15-mark scenario permits pseudocode or the specified languages. Test the algorithm with relevant data, amend faults and test again.

Pause and explain

Which plan is most complete for a two-branch discount?

Put the idea to work

Worked example

Write steps for a club discount: members pay 90% of the original price; others pay full price.

Show the worked solution
  1. Input Price and IsMember.
  2. If IsMember is True, set FinalPrice to Price*0.9.
  3. Otherwise set FinalPrice to Price; output the result.

Answer INPUT Price, IsMember; IF IsMember = TRUE THEN FinalPrice ← Price * 0.9 ELSE FinalPrice ← Price ENDIF; OUTPUT FinalPrice.

Try a topic test

Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.

Test this topic →

From guided practice to a new situation

Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.

1 · Guided

Write pseudocode steps to read 5 prices, total them and display the average.

Give me a hint

Initialise before the loop and divide after all five values are processed.

Compare my reasoning
  1. Set Total ← 0 and Count ← 0.
  2. Repeat five times: input Price; Total ← Total + Price; Count ← Count + 1.
  3. Output Total / Count.

Total ← 0; Count ← 0; REPEAT 5 TIMES INPUT Price; Total ← Total + Price; Count ← Count + 1; ENDREPEAT; OUTPUT Total / Count.

Look for these in your work

  • Initialisation
  • Loop input/update
  • Average output
2 · Independent

A ticket system charges 12 for adults and 7 for children. Describe the condition, both calculations and output needed.

Give me a hint

Use passenger type to choose one of two prices.

Compare my reasoning
  1. Input PassengerType.
  2. If it is Adult, set Fare ← 12; otherwise if Child, set Fare ← 7.
  3. Display Fare, or report invalid type for any other input.

Check the passenger type, assign the matching fare, and output it; handle any unsupported type explicitly.

Look for these in your work

  • Input
  • Two valid branches
  • Invalid case
3 · Transfer

A new algorithm works for normal inputs but fails at the highest allowed quantity. Describe a responsible amend-and-test cycle.

Give me a hint

Reproduce the failure, fix the rule, then check both boundaries.

Compare my reasoning
  1. Record the failing maximum input and expected output.
  2. Inspect loop limits or range comparisons and amend the algorithm.
  3. Retest the maximum, just-outside value and representative normal data.

Use a boundary test to reproduce the defect, amend the endpoint condition and rerun the failed case plus adjacent and representative tests. Update the design or code if any expected result still fails.

Look for these in your work

  • Reproducible case
  • Targeted correction
  • Regression tests

Common mistakes

  • Writing a solution that omits the non-member branch
  • Ignoring the required representation or syntax for the assessment
Recall without your notes

What can you explain now?

What should a scenario algorithm be checked against?

Compare with the explanation

The stated inputs, rules and expected outputs

Tests should demonstrate that the algorithm meets each requirement.

After trying it yourself, choose your next review. This is your self-assessment.

Your review choice appears on Today. Sign in to sync it across devices.

Make it stick

What steps take a scenario from requirements to a tested algorithm?

If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.

Keep learning Computer Science (9-1)

Course scope and assessment

165 original lessons map the listed objectives across all 10 main topics in the 2026–2028 Version 4 syllabus. Cambridge states that 0984 has the same subject content as 0478, with 9–1 grading. Three retained introductory lessons remain available but are not counted as syllabus-mapped teaching. The 2023–2025 syllabus remains unmapped. The separately published 2029–2031 syllabus changes to Python 3 only and removes pseudocode; this 2026–2028 route does not cover those changes. In June and November, Cambridge lists 0984 in Administrative zone 3 and for centres in Oman and the UAE. Confirm availability for your centre and exam series with Cambridge International. Practical programming in an executable browser workspace, full timed-paper practice and human subject-teacher review remain outstanding. Practice is self-checked and does not award an official Cambridge grade.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.