Past-paper question · 2014 May-June · Paper 23 · Q4(b)(ii)

Question 4(b)(ii) 2014 · May-June · Paper 23 · 32 marks

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

Official answer for Question 4

Part (b)

(ii)

(ii)

Puzzle[1,3] 5

[2]
✓
1 mark for correct index, 1 mark for remainder correct

Mark scheme 9691_s14_ms_23.pdf →

Show text version of question

Question 4

Part (b)

(ii)

Question 4

[4]

Question 5

2 Sheena wants to set up a business selling home-made cakes. She wants customers to order online. She needs to know:

  • customer’s name
  • customer’s contact telephone number
  • the date the cake is to be ready
  • the type of cake
  • o fruit cake o victoria sponge o gateau o cheesecake

  • whether the cake is to be delivered or not.

Sheena wants to store the data for each order as a record consisting of the following fields:

  • CustomerName
  • TelephoneNumber
  • DateReady
  • CakeType (F, V, G or C)
  • Price ($)
  • ToBeDelivered

(ii)

Using a high-level programming language, declare a record structure for the fields

defined in part (b)(i).

Language

Code

[4]

Question 7

Question 3 begins on page 8.

Question 8

3 Raza wants to write a number-guessing game. He has drawn a flowchart of an algorithm:

START

MyNumber RANDOM(100)

The algorithm uses EndGame

  • the built-in function RANDOM(x) which
  • FALSE returns a random integer in the range 1 to x.

  • the variables

Initialise NumberOfGuesses ○ EndGame ○ Guess ○ MyNumber Output ○ NumberofGuesses “Guess my number Type 0 (zero) to end game”

Input Guess

Is Guess = 0 No Increment ? NumberOfGuesses

Yes

Output Is Guess = No Is Guess > No “You gave up after” MyNumber ? MyNumber ? NumberOfGuesses Yes Yes

Output Output Output “Correct - you took” “Too high - “Too low - NumberOfGuesses try again” try again” “to guess my number”

EndGame TRUE EndGame TRUE

No Is EndGame TRUE?

Yes

END

Question 9

In a high-level language write programming statements to implement the algorithm.

Language

Code

[18]

Question 10

4 A puzzle starts with a partially completed grid of digits. A player must fill a 9×9 grid with single digits so that each column, each row, and each of the nine 3×3 sub-grids contain all of the digits from 1 to 9.

Each puzzle has a unique solution. Below is an example of a puzzle and its solution:

PUZZLE SOLUTION

Raul wants to write a program that displays the puzzle and allows the user to enter digits to attempt a solution.

Part (a)

Describe the type of interface needed so that the user can enter digits on screen.

[2]

Part (b)

The program needs to store the puzzle.

(i)

Describe the data structure required.

[2]

(ii)

Using the data structure you described in part (b)(i), give the pseudocode assignment

statement that stores the 5 in the top row of the example shown.

[2]

Question 11

Topic relevance

Why this question appears here

72% assigned-topic match · Algorithm design and problem-solving › Algorithms

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

Keep practising this topic