IGCSE · Computer Science 0478 · Algorithms & programming

Programming & scenario questions: IGCSE Computer Science questions with answers

Free Programming & scenario questions questions for IGCSE Computer Science (0478), part of Algorithms & programming. Each question has the answer and the marking points an examiner would look for.

Generate a full Programming & Scenario Questions worksheet →All Algorithms & programming questions

Programming & scenario questions practice questions

Question 1Structured · 4 marks

Give the value returned by each of these expressions.

ExpressionValue
ROUND(18.613, 2)
50 MOD 8
LENGTH("Software")
50 DIV 8
Table 1.1

Complete the table.

[4]
Show answers and mark scheme
PartAnswer and marking pointsMarks
ROUND(18.613, 2) = 18.61; 50 MOD 8 = 2; LENGTH("Software") = 8; 50 DIV 8 = 6
ROUND(18.613, 2) = 18.61 B1
50 MOD 8 = 2 B1
LENGTH("Software") = 8 B1
50 DIV 8 = 6 B1
4
Question 2Structured · 8 marks
(a)

Explain the difference between a procedure and a function.

[2]
(b)

Write pseudocode for a function IsEven that takes Number as parameter and returns TRUE if the number is even and FALSE otherwise.

[4]
(c)

Explain the difference between a local variable and a global variable.

[2]
Show answers and mark scheme
PartAnswer and marking pointsMarks
(a)A function returns a value to the calling statement; a procedure does not return a value
A function returns a value B1
A procedure does not / is called as a statement B1
2
(b)FUNCTION IsEven(Number : INTEGER) RETURNS BOOLEAN / RETURN Number MOD 2 = 0 / ENDFUNCTION
FUNCTION IsEven(…) with correct parameter B1
RETURNS BOOLEAN B1
RETURN Number MOD 2 = 0 B1
ENDFUNCTION B1
4
(c)A local variable can only be used inside the module where it is declared; a global variable can be used anywhere in the program
Local: only accessible in the procedure/function where declared B1
Global: accessible throughout the whole program B1
2
Question 3Structured · 8 marks
(a)

Explain the difference between a procedure and a function.

[2]
(b)

Write pseudocode for a function Area that takes Length and Width as parameters and returns the area of a rectangle.

[4]
(c)

Explain the difference between a local variable and a global variable.

[2]
Show answers and mark scheme
PartAnswer and marking pointsMarks
(a)A function returns a value to the calling statement; a procedure does not return a value
A function returns a value B1
A procedure does not / is called as a statement B1
2
(b)FUNCTION Area(Length : REAL, Width : REAL) RETURNS REAL / RETURN Length * Width / ENDFUNCTION
FUNCTION Area(…) with correct parameters B1
RETURNS REAL B1
RETURN Length * Width B1
ENDFUNCTION B1
4
(c)A local variable can only be used inside the module where it is declared; a global variable can be used anywhere in the program
Local: only accessible in the procedure/function where declared B1
Global: accessible throughout the whole program B1
2
Question 4Structured · 8 marks
(a)

Explain the difference between a procedure and a function.

[2]
(b)

Write pseudocode for a function Fahrenheit that takes Celsius as parameter and returns the temperature in Fahrenheit.

[4]
(c)

Explain the difference between a local variable and a global variable.

[2]
Show answers and mark scheme
PartAnswer and marking pointsMarks
(a)A function returns a value to the calling statement; a procedure does not return a value
A function returns a value B1
A procedure does not / is called as a statement B1
2
(b)FUNCTION Fahrenheit(Celsius : REAL) RETURNS REAL / RETURN Celsius * 9 / 5 + 32 / ENDFUNCTION
FUNCTION Fahrenheit(…) with correct parameter B1
RETURNS REAL B1
RETURN Celsius * 9 / 5 + 32 B1
ENDFUNCTION B1
4
(c)A local variable can only be used inside the module where it is declared; a global variable can be used anywhere in the program
Local: only accessible in the procedure/function where declared B1
Global: accessible throughout the whole program B1
2

More Algorithms & programming questions

Want a mentor, not just a paper?

Riyaz Shaikh has mentored IGCSE, IB and A Level students for 15+ years, one-on-one, online and in Mumbai. The hardest questions on this site are the ones he uses to find a student's weak points.

Meet Riyaz →

Original Cambridge-style practice questions written for mentorriyaz.in. These are not Cambridge past paper questions, and this site is not affiliated with or endorsed by Cambridge University Press & Assessment. Updated 2026-11-04. Paper generator · mentorriyaz.in