Welcome back to our OCR GCSE Computer Science (J277) revision series! Today, we are putting our programming skills to the test with a custom 5-question mock paper focused entirely on writing algorithms.
We will walk through how to code the solutions in Python, securing every single mark on the mark scheme.
We will cover:
- Q1 (5 Marks): Writing a `while` loop for input validation (trapping invalid test scores).
- Q2 (6 Marks): Iterating through a 1D array to calculate a running total and an average.
- Q3 (4 Marks): Using `len()` and string indexing to validate a password.
- Q4 (5 Marks): Defining a modular function with a parameter and a `return` value.
- Q5 (6 Marks): Searching a 2D array using a `FOR` loop and a Boolean flag to handle 'Not Found' scenarios.
Download
0 formats
No download links available.
Writing Exam Algorithms in Python: 5-Question Walkthrough | OCR J277 Paper 2 | NatokHD