logo

AQA A-Level Computer Science practice

What is output by this pseudocode? number <- 2 REPEAT 3 TIMES OUTPUT number number <- number + 1 END REPEAT

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Abstraction and automation

Exam-style question

Try this first

What is output by this pseudocode? number <- 2 REPEAT 3 TIMES OUTPUT number number <- number + 1 END REPEAT.

  1. A.2, 2, 2
  2. B.2, 3, 4
  3. C.3, 4, 5
  4. D.2, 3

Answer and explanation

Concise answer

2, 3, 4

Why this is correct

The loop runs three times. The values output are 2, then 3, then 4, because number is increased after each output.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions