Past-paper question · 2015 May-June · Paper 23 · Q2(b)(i)

Question 2(b)(i) 2015 · May-June · Paper 23 · 3 marks

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

Official answer for Question 2

Part (b)

(i)

Part (b)

(i)

✓
Input
✓
Output
✓
value
✓
Comment
✓
Amount
✓
Fifty
✓
Twenty
✓
Ten
✓
Dollar
✓
Dollar
✓
Dollar

Question 70

Question 1

Question 1

✓
0
✓
Least possible number of notes

Question 85

✓
( 0
✓
0
✓
0 )
✓
Error message
✓
130

Question 2

Question 1

Question 1

✓
Least possible number of notes
✓
600
✓
( 0
✓
0
✓
0 )
✓
Error message
✓
Penalise any number entries on the 85 and 600 rows
[3]

Mark scheme 9608_s15_ms_23.pdf →

Show text version of question

Question 2

Part (b)

(i)

Bank customers withdraw money from their account at a cash dispenser machine using their bank card. The machine operates as follows:

  • it can dispense the following notes:
  • o $50 o $20 o $10

  • the maximum amount for a single withdrawal is $500

When a customer withdraws money, they enter the amount to withdraw. (This must be a multiple of $10).

The machine will always dispense the least possible number of notes.

A
program is designed for the machine to process a withdrawal.

The following variables are used:

Identifier Data type Description Amount INTEGER Amount to withdraw entered by the user

FiftyDollar INTEGER Number of $50 notes to dispense

TwentyDollar INTEGER Number of $20 notes to dispense

TenDollar INTEGER Number of $10 notes to dispense

Temp INTEGER Used in the calculation of the number of each note required

Question 5

(i)

The following four tests have been designed.

Complete the test data table showing the expected results with comments.

Input value Output Comment Amount FiftyDollar TwentyDollar TenDollar

70 1 1 0 Least possible number of notes

Question 85

130

600

[3]
Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Programming basics

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_s15_qp_23.pdf

Keep practising this topic