Past-paper question · 2015 October-November · Paper 21 · Q5(b)

Question 5(b) 2015 · October-November · Paper 21 · 6 marks

Original past-paper question for 5(B)
Original past-paper question for 5(B)
Original past-paper question for 5(B)
Reveal official mark-scheme answer Official mark-scheme answer for 5(B)Official mark-scheme answer for 5(B)

Official answer for Question 5

Part (b)

Part (b)

OUTPUT "Enter Purchase price”

✓
INPUT PurchasePrice
✓
CurrentValue ← PurchasePrice
[1]
✓
YearCount ← 1
✓
WHILE YearCount < 9 AND CurrentValue >= 1000
[2]
✓
Note: Penalise: inclusion of $
✓
IF YearCount = 1
[1]
✓
THEN
✓
CurrentValue ← CurrentValue * (1 - 40/100)
✓
ELSE
✓
CurrentValue ← CurrentValue * 0.8
[1]
✓
ENDIF
✓
OUTPUT YearCount, CurrentValue
✓
YearCount ← YearCount + 1
[1]
✓
ENDWHILE
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International AS/A Level – October/November 2015
✓
9608

Question 21

Mark scheme 9608_w15_ms_21.pdf →

Show text version of question

Question 5

Part (b)

Question 5

A driver buys a new car.

The value of the car reduces each year by a percentage of its current value.

The percentage reduction is:

  • in the first year, 40%
  • in each following year, 20%

The driver writes a program to predict the value of the car in future years.

The program requirements are:

  • enter the cost of the new car (to nearest $)
  • calculate and output the value of the car at the end of each year
  • the program will end when either the car is nine years old, or when the value is less than

$1000

Part (b)

Complete the pseudocode for this design.

OUTPUT "Enter purchase price" INPUT PurchasePrice

CurrentValue ← ...................................................................................................... YearCount 1 ← WHILE ....................................... AND .........................................................................

IF ............................................................................................................................ THEN CurrentValue ← CurrentValue * (1 – 40 / 100) ELSE CurrentValue ← ...................................................................................... ENDIF

OUTPUT YearCount, CurrentValue

................................................................................................................................... ENDWHILE

[6]

Question 9

Topic relevance

Why this question appears here

82% assigned-topic match · Programming › Constructs

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9608_w15_qp_21.pdf

Keep practising this topic