Skip to content

Course home

Programming fundamentals

Programming fundamentals

EasyMediumHard
123456789101112131415161718192021222324
Question 12

The following program uses a condition-controlled loop.

m = 40
n = 5
while m >= n
    m = m - n
    n = n * 2 - 3
endwhile
print(m)

Complete the trace table to show the values of m, n and any output at each step of the algorithm.

mnoutput
[4]
Markscheme

Programming fundamentals Questions

  1. GCSE
  2. /Computer Science
  3. /Programming fundamentals

95 exam-style questions on OCR GCSE Computer Science Programming fundamentals. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank