| OCR |
GCSE (9-1) Computer Science
Mark Scheme
J277/02: Unit 2.2 Programming Advanced
|
| Question | Answer | Marks | Guidance |
|---|---|---|---|
| 1 |
|
4 |
1 mark per correct answer.
For DIV, integer division truncates decimals.
|
| 2 |
|
3 |
1 mark per correct answer.
|
| 3 |
|
3 | |
| 4 |
(a) = (1)(b) == (1)(c) if score == 100: (1)
|
3 |
Must use correct operators.
|
| 5a |
|
2 | |
| 5b |
if age >= 13 AND age <= 19:
|
2 |
1 mark for AND. 1 mark for correct comparison boundaries.
|
| 6 | Runtime Error (or TypeError). You cannot concatenate a String ("The price...") with an Integer (price) without casting. | 2 |
Reject: "It doesn't work". Must use technical terms.
|
| 7 |
Rows: 1. 8 | 3 | 3 | True (1) 2. 6 | 4 | 7 | True (1) 3. 4 | 5 | 12 | False (1) 4. Final Output: 12 (2 marks for stopping and output) |
5 | |
| 8 |
1. AND (1)2. OR (1)
|
2 | |
| 9 |
if id >= 1 and id <= 3:
print("Red")
elif id >= 4 and id <= 6:
print("Blue")
else:
print("Spectator")
|
4 |
1 mark for combining conditions. 1 mark for AND. 1 mark for elif. 1 mark for else.
|
| 10 |
|
6 | |
| 11 |
item1.Stock = item1.Stock - 5
|
2 |
1 mark for dot notation. 1 mark for correct assignment logic.
|