Past-paper question · 2016 May-June · Paper 23 · Q1

Question 1 2016 · May-June · Paper 23 · 8 marks

Original past-paper question for 1
Original past-paper question for 1
Reveal official mark-scheme answer Official mark-scheme answer for 1

Official answer for Question 1

(i)

[2]
✓
Identifier
✓
Data type
✓
Explanation
✓
Lower bound value of
✓
LowerTemp
✓
INTEGER
✓
Fahrenheit temperatures
✓
Upper bound value of
✓
UpperTemp
✓
INTEGER
✓
Fahrenheit temperatures
✓
The interval between two
✓
Interval
✓
INTEGER
✓
Fahrenheit temperatures
✓
The Fahrenheit to be
✓
Fahrenheit
✓
INTEGER
✓
converted
✓
Value of conversion before
✓
Result
✓
REAL/FLOAT
✓
rounding
✓
Celsius
✓
INTEGER
✓
The rounded Result
✓
Mark as follows:

Mark scheme 9691_s16_ms_23.pdf →

Show text version of question

Question 1

Zara wants to write a temperature conversion program. The program is to output a table to show Fahrenheit temperatures and their Celsius equivalents.

She writes the program specification:

  • input lower bound and upper bound of Fahrenheit temperatures (whole numbers only)
  • input temperature interval (whole number only)
  • output conversion table (Celsius temperatures rounded to the nearest whole number)

Example conversion table with lower bound 50, upper bound 90 and interval 5:

Conversion Table Fahrenheit Celsius 50 10 55 13 : : : : 90 32

The steps to convert a Fahrenheit temperature to a Celsius temperature are:

  • subtract 32 from the Fahrenheit temperature
  • multiply by 5
  • divide by 9

(i)

Zara writes pseudocode that uses the variables in the identifier table below.

Complete the identifier table.

Identifier Data type Explanation

Lower bound value of Fahrenheit LowerTemp temperatures

Upper bound value of Fahrenheit UpperTemp temperatures

The interval between two successive Interval Fahrenheit temperatures in the table

The Fahrenheit temperature value to Fahrenheit be converted

Value of conversion to Celsius Result before rounding

Celsius The rounded Result

[2]

Question 3

(ii)

The built-in function ROUND(x) returns x rounded to the nearest whole number.

Complete the pseudocode to print the conversion table:

INPUT LowerTemp

INPUT UpperTemp

INPUT Interval

OUTPUT " Conversion Table"

OUTPUT "Fahrenheit Celsius"

Fahrenheit ← .....................................................................................................................

REPEAT

Result ← .......................................................................................................................

........................................................................................................ ← ROUND(Result)

OUTPUT Fahrenheit, " ", Celsius

Fahrenheit ← ...............................................................................................................

UNTIL Fahrenheit > ..........................................................................................................

[6]
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 9691_s16_qp_23.pdf

Keep practising this topic