Skip to content

Course home

Representing algorithms

Representing algorithms

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
Question 37

Refer to the algorithm shown in the pseudocode below:

1  processing ← True
2  WHILE processing = True
3      size ← USERINPUT
4      IF size > 2 THEN
5          reductions ← 0
6          WHILE size > 2
7              size ← size DIV 3
8              reductions ← reductions + 1
9          ENDWHILE
10     ELSE
11         processing ← False
12     ENDIF
13     OUTPUT size
14 ENDWHILE

What is the value of the variable reductions when the user input is 250?

A

333

B

444

C

555

D

666

Markscheme

Representing algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Representing algorithms

208 exam-style questions on AQA GCSE Computer Science Representing algorithms. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank