Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)

Constructs: Practice Questions

5 multiple-choice questions marked as you go, and 4 written questions with worked solutions. All on Constructs.

9 questions23 marksFree, no account
Question 1
1 mark

Which programming construct is used to repeat a block of code a specific number of times?

Question 2
1 mark

Consider the following pseudocode snippet:

x = 10
y = 5
IF x > y THEN
  x = x - y
ELSE
  y = y - x
ENDIF


Which programming construct is demonstrated by the IF statement?

Question 3
1 mark

Which of the following is a characteristic of a subprogram (procedure or function) that uses a single entry point and a single exit point?

Question 4
1 mark

Which programming construct is used to execute a set of instructions multiple times until a specific condition is no longer met?

Question 5
1 mark

In a high-level programming language, which of the following best describes the use of a local variable within a subprogram?

Question 6
2 marks

Identify the programming construct used to execute a block of code only if a specific condition is met.

Write your answer out first, then check it against the worked solution.

Question 7
4 marks

Describe the difference between a count-controlled loop and a condition-controlled loop.

Write your answer out first, then check it against the worked solution.

Question 8
6 marks

Explain the benefit of using local variables within a subprogram instead of global variables.

Write your answer out first, then check it against the worked solution.

Question 9
6 marks

A algorithm is designed to calculate the factorial of a number \(n\) (written as \(n!\)).

(a) Use pseudocode to write a count-controlled loop that calculates \(5!\) and stores it in a variable result.
(b) Explain why a condition-controlled loop (like a WHILE loop) might be used instead if the user was providing the input value.
(c) How would you modify the algorithm to ensure it doesn't crash if the user enters a negative number?

Write your answer out first, then check it against the worked solution.

* The content provided by thinka is generated by AI and may not always be accurate or up-to-date. Please use it as a supplementary resource and verify with official materials.

You've seen the model answer. Now get yours marked.

This page can show you how a good answer looks. It cannot tell you what your answer was missing. thinka marks your written work against the real mark scheme in about 15 seconds.

Want more questions like these? Get a fresh set on this topic, graded as you go.

Practice More