Past-paper question · 2023 October-November · Paper 21 · Q8(b)

Question 8(b) 2023 · October-November · Paper 21 · 6 marks

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

Official answer for Question 8

Part (b)

Question 6

✓
One mark for each of the following points
✓
START
  • correct use of flowchart symbols
  • working flow lines and complete
  • both inputs correct
✓
INPUT Length
  • working range check
  • working calculation
  • correct output rounded to two decimal places
✓
Is Length >=0.5
✓
No
✓
AND Length <=
✓
6.0 ?
✓
Yes
✓
INPUT Cost
✓
Price Length * Cost
✓
OUTPUT
✓
"Price ",
✓
ROUND(Price,2)
✓
STOP

Mark scheme 0478_w23_ms_21.pdf →

Show text version of question

Question 8

Part (b)

Question 8

A programmer is designing an algorithm to calculate the cost of a length of rope.

The program requirements are:

  • input two values: the length of rope in metres Length and the cost of one metre Cost
  • perform a validation check on the length to ensure that the value is between 0.5 and 6.0
  • inclusive

  • calculate the price Price
  • output the price rounded to two decimal places.

Use the variable names given.

Part (b)

Complete the flowchart for this algorithm.

START

STOP

[6]

Question 9

Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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 0478_w23_qp_21.pdf

Keep practising this topic