How to Answer Programming Questions (Cambridge (CIE) IGCSE Computer Science): Revision Note

Exam code: 0478 & 0984

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

How do I answer a CIE IGCSE Computer Science programming question?

  • Programming questions can appear in both papers

  • Paper 1 may include questions that test understanding and interpretation of algorithms and computational thinking principles, including the ability to trace and explain pseudocode

  • Paper 2 is the paper that primarily assesses the ability to design, write, test, and refine programs

    • It also includes a fixed 15‑mark programming question at the end of the paper

  • All questions must be answered using:

    • CIE pseudocode notation

    • Structured English

    • High‑level programming language

  • To attempt a programming question that requires the writing of a new program, you should always ask yourself the following five key questions:

    • What are the inputs?

    • What are the outputs?

    • What processes take place?

    • What constructs will I need to use?

    • Do I need to use subprograms?

Example

Question

The string operation SUBSTRING(Quote, Start, Number) returns a string from Quote

beginning at position Start that is Number characters long. The first character in Quote is in position 1.

Write pseudocode statements to:

  • store the string "Learning Never Exhausts The Mind" in Quote

  • extract and display the words "The Mind" from the string

  • output the original string in lower case.

[5 marks]

What are the inputs? What are the outputs? What processes take place?

The string operation SUBSTRING(Quote, Start, Number) returns a string from Quote

beginning at position Start that is Number characters long. The first character in Quote is in position 1.

  • store the string "Learning Never Exhausts The Mind" in Quote

  • extract and display the words "The Mind" from the string

  • output the original string in lower case.

What constructs will I need to use?

  • Sequence

    • Each pseudocode instruction is executed in order

  • Assignment

    • Assigning the string to Quote

  • String manipulation

    • Using SUBSTRING() to extract part of a string

  • Case conversion

    • Using LCASE() (or similar function) to convert the string to lowercase

Do I need to use subprograms?

  • In this question, the subprograms are built-in string handling functions:

    • SUBSTRING(Quote, Start, Number) – extracts part of a string

    • LCASE(Quote) – returns the lowercase version of the string

Answer

Pseudocode

Quote ← "Learning Never Exhausts The Mind"

Start ← 25

Number ← 8

OUTPUT SUBSTRING(Quote, Start, Number)

OUTPUT LCASE(Quote)

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.