logo

Question detail

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

Try the question, check the answer, then read the explanation to understand the curriculum point.

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

Model answer

What a good answer should say

  • 2, 3, 4

Explanation

Why this works

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

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.