| OCR |
GCSE (9-1) Computer Science
Mark Scheme
J277/02: Unit 2.2 Arrays & Data Structures
|
| Question | Answer | Marks | Guidance |
|---|---|---|---|
| 1 |
Gap 1: scores.length (or 5) (1)Gap 2: i (1)
|
2 |
Must reference the loop variable
i correctly for the index. |
| 2 |
Any two from:
|
2 |
Do not accept "It's faster" without explanation. Focus on coding efficiency.
|
| 3a | "Dan" | 1 | |
| 3b | "Caz" | 1 | |
| 3c |
Result: Error / Out of bounds (1) Reason: The array has rows 0 and 1. Row 2 is outside the valid range (1). |
2 |
Ghost Topic: Precision on (Row, Col) order and "Out of bounds" terminology is critical.
|
| 4a | It updates Column 1 (Price) instead of Column 2 (Quantity). | 1 |
Column mapping is a low-scoring area in reports.
|
| 4b | stock[0, 2] = stock[0, 2] - 1 |
1 | |
| 5 |
- (0, 1): val 2 | total -2 - (1, 0): val 3 | total 1 - (1, 1): val 4 | total 5 - Final Output: 5 |
4 |
1 mark for each correct step update of total.
|
| 6a | Stored as Integers/Numbers which do not keep leading zeros. | 1 |
Data Type Trap: Phone numbers must be Strings.
|
| 6b | contacts = ["07...", "07...", ...] |
1 |
Quotes must be added to preserve formatting.
|
| 7 |
id = input("Enter Student ID")
|
6 |
BP4: Fixed Row (id), Changing Col (i) is required.
|
| 8 |
found = False
|
6 |
Logic Error: Printing "Not Found" inside the loop is an immediate fail.
|