Past-paper question · 2014 May-June · Paper 22 · Q1(b)

Question 1(b) 2014 · May-June · Paper 22 · 6 marks

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

Official answer for Question 1

Part (b)

Part (b)

Mark as follows:

  • 1 mark for each box correctly translated into chosen programming language
  • Identifiers must be the same as given in flowchart
  • Give 1 mark for loop header and end correctly coded (must be a FOR loop)
  • Ignore any declarations
  • If candidate only says “Visual Basic” (no version number) use the mark scheme that best
✓
fits the answer
  • If language given is “Pseudocode”, give no marks
✓
[max 6]
✓
VB6 – accept console mode answers
✓
Number = InputBox("")
✓
Msg = Number & " Times Table" & vbCrLf
✓
For i = 1 To 10
✓
Result = i * Number
✓
Msg = Msg & i & "x" & Number & "=" & Result & vbCrLf
✓
Next i
✓
Msg = Msg & "Press any key"
✓
MsgBox(Msg)
✓
VB.NET/VB 2005 etc.
✓
Number = Console.ReadLine();
✓
Console.WriteLine(Number & " Times Table");
✓
For i = 1 To 10
✓
Result = i * Number
✓
Console.WriteLine(i & "x" & Number & "=" & Result)
✓
Next i
✓
Console.WriteLine("Press any key")
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
GCE AS/A LEVEL – May/June 2014
✓
9691

Question 22

✓
QBASIC
✓
INPUT Number;
✓
PRINT Number; " Times Table"
✓
FOR i = 1 TO 10
✓
Result = i * Number
✓
PRINT i; "x"; Number; "="; Result
✓
NEXT i
✓
PRINT "Press any key"
✓
PASCAL
✓
ReadLn(Number);
✓
WriteLn(Number, ' Times Table');
✓
For i := 1 To 10 Do
✓
Begin
✓
Result := i * Number;
✓
WriteLn(i, 'x', Number, '=', Result); // semicolon optional here
✓
End;
✓
// Begin End are part of the loop
✓
structure
✓
WriteLn('Press any key');
✓
PYTHON
✓
Number = int(input())
✓
print(Number, "Times Table")
✓
for i in range(1,11) :
✓
Result = i * Number
✓
print(i, "x", Number, "=", Result)
✓
print("Press any key")

Mark scheme 9691_s14_ms_22.pdf →

Show text version of question

Question 1

Part (b)

Question 1

A teacher wants to write a program to help young children learn their multiplication tables.

Part (b)

If the child chooses the number 7, the screen displays:

7 Times Table ============= 1 × 7 = 7 2 × 7 = 14 3 × 7 = 21 4 × 7 = 28 5 × 7 = 35 6 × 7 = 42 7 × 7 = 49 8 × 7 = 56 9 × 7 = 63 10 × 7 = 70

Press any key

Question 3

The algorithm to produce this output is The program needs the following three integer represented by the flowchart below: variables:

  • Number
  • START

  • i
  • Result

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

Language Output title Code

Loop for i from 1 to 10

Result i * Number

Output i × Number = Result

No end of loop?

Yes

Output “Press any key”

[6]

END

Question 4

Topic relevance

Why this question appears here

82% 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_22.pdf

Keep practising this topic