Past-paper question · 2013 October-November · Paper 22 · Q11(a)(i)

Question 11(a)(i) 2013 · October-November · Paper 22 · 25 marks

Original past-paper question for 11(A)(I)
Original past-paper question for 11(A)(I)
Original past-paper question for 11(A)(I)
Original past-paper question for 11(A)(I)
Original past-paper question for 11(A)(I)
Original past-paper question for 11(A)(I)
Reveal official mark-scheme answer

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9691_w13_ms_22.pdf →

Show text version of question

Question 11

Part (a)

(i)

Question 11

ENDIF

Question 9

Part (b)

(i)

Complete the trace table using "Aisha" as input. For

Examiner's Password Attempt Password = "Aisha" Use Attempt Password Output = "Aisha" > 3 OR Attempt > 3 0

Aisha

[3]

(ii)

Complete the trace table using the following sequence of inputs:

"aisha", "Asha", "AISHA"

Password Attempt Password = "Aisha" Attempt Password Output = "Aisha" > 3 OR Attempt > 3 0

[5]

Question 10

Part (c)

This piece of code does not do what Aisha intended. There is an error. For

Examiner's Use

(i)

State the type of error.

[1]

(ii)

There are several ways to correct this. One is to change line 5.

Rewrite line 5.

[1]

Part (d)

State why someone’s name is not a good password.

[1]

Part (e)

Describe how to choose a more secure password.

[2]

Question 11

Question 3 continues on page 12.

Question 12

Part (f)

Having entered a correct password, Aisha wants to present a menu screen. For

The user is to enter a number between 1 and 4 to make a choice. Examiner's Use

  • Option 1 - email
  • Option 2 - social network
  • Option 3 - schoolwork
  • Option 4 - favourite websites

The number entered is to be stored in a variable, Choice. Each option calls an appropriate procedure.

(i)

Write program code which

  • inputs the user’s choice,
  • validates this choice,
  • uses nested IF statements to call the appropriate procedure.

Programming language

Code

[6]

Question 13

(ii)

Rewrite your IF statements using a CASE/SELECT statement to implement the For

menu options. Examiner's Use

[4]

Question 14

4 Aisha writes the following pseudocode for a recursive function that works out the greatest For common divisor of two positive integers: Examiner's Use 0 FUNCTION Divisor(x, y) 1 IF y = 0 2 THEN 3 RETURN x 4 ELSE 5 x ← x MOD y 6 RETURN Divisor(y, x) 7 ENDIF 8 ENDFUNCTION

(i)

Trace the call Divisor(8, 2).

Line number x y RETURN

0 8 2

[2]
Topic relevance

Why this question appears here

98% assigned-topic match · Computational thinking and problem-solving › Recursion

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

Keep practising this topic