OCR J277 Paper 2: Common Mistakes and How to Avoid Them

The 15 mistakes OCR examiners report most often in GCSE Computer Science Paper 2 (J277/02), 2022-2025, with quick fixes and code examples for your mocks.

OCR J277 Paper 2: Common Mistakes and How to Avoid Them

By Yuness, qualified Computer Science teacher and former Head of KS5 Computer Science · Last reviewed 21 November 2026

OCR's examiners' reports for J277/02 (2022 to 2025) show the same mistakes again and again. Students leave the variable out of the second half of an AND/OR condition, get boundaries wrong by one, write functions that ignore their parameters, make careless trace table entries and SQL errors, and give examples or generic answers when the question wants a definition or something tied to the scenario. Nearly all of these are precision errors, not gaps in knowledge, so your mock is the ideal time to find and fix them. Below are 15 mistakes, each linked to the examiners' report year that recorded it.

The 15 most common Paper 2 mistakes at a glance

#MistakeReported inQuick fix
1Flowcharts or English in a Section B "write" question2022, 2023, 2024, 2025Write code in ERL or your own language
2Leaving the variable out of the second condition2022, 2024, 2025Repeat the variable on both sides of AND/OR
3Wrong boundaries (> vs >=)2024, 2025Test the exact boundary values in your head
4Mixing AND and OR without brackets2022, 2023, 2025Use brackets or nested ifs
5Functions that ignore their parameters or print instead of return2022, 2024, 2025Use the parameter; return the result
6Trace table slips2022, 2023, 2024Trace to the end; leave empty cells blank
7Concatenation, output and assignment slips2022, 2024, 2025Use + to join; never put a variable in quotes
8Array index and loop errors2022, 2024, 2025Know when you have an index and when you have an item
9SQL syntax errors2022, 2023, 2024, 2025Commas between fields, WHERE not IF, quotes round text
10Merge sort without proper merges2022, 2025Every merge must produce a sorted list
11Vague search descriptions2022, 2025Give every case, including the stopping condition
12Examples instead of definitions, finding errors without fixing them2022, 2023, 2024Define first, then fix in code
13Confusing validation, testing and test data2023, 2024Validation checks user input; test data is real values
14Generic answers with no context2022, 2023, 2024Refer to the code or scenario given
15Logic gate and flowchart symbol errors2022, 2023, 2024, 2025Use standard shapes; label decision branches

How J277/02 is structured (and why it matters for mistakes)

Paper 2, Computational thinking, algorithms and programming, is worth 80 marks, lasts 1 hour 30 minutes and makes up 50% of the GCSE. This comes from OCR's Exploring our question papers guide (September 2024). The sample question paper says calculators are not allowed.

Section ASection B
Marks5030
Suggested timeAbout 50 minutesAbout 40 minutes
StyleShort and medium questions, including one 6-mark questionScenario-based questions that get harder as you go, covering Design, Write, Test and Refine
How you can answerAny format (pseudocode, flowchart, bullet points, ERL or a high-level language), unless the question says otherwiseWrite and Refine questions need OCR Exam Reference Language (ERL) or a high-level language. Design questions also accept English, pseudocode and flowcharts

OCR added the suggested times from the June 2024 series onwards (OCR subject update, November 2023). OCR's Exploring our question papers guide also says minor syntax slips such as a missing colon are not normally penalised, but some errors are, such as writing assignment backwards (7 = x). You don't have to memorise ERL, but you do need to be able to read it. For the full topic list, see our algorithm design and programming guides.

Programming and logic mistakes

1. Using a flowchart or structured English when the question asks for code

What goes wrong: Every examiners' report from 2022 to 2025 repeats the same warning: in Section B, flowcharts and structured English earn no marks where code is required.

What examiners want: Code written in ERL or any high-level language you have studied. The 2025 report confirms you are not penalised for which language you use, for mixing languages, or for letter case. Answers are marked on whether the logic is correct and consistent.

Quick fix: Look for the instruction to use ERL or a high-level language and answer in the language you use in lessons. The 2022, 2023 and 2024 reports all note that the highest scorers used one high-level language consistently.

2. Leaving the variable out of the second half of a condition

What goes wrong: The 2022 report called this perhaps the most common mistake, and it has come up again since. The 2022 report gives room == "basic" or "premium", the 2024 report gives if total >= 10 and <= 20 then, and the 2025 report gives PIN == "1234" OR "4321".

What examiners want: A complete comparison on each side of the AND/OR: if total >= 10 and total <= 20 then and PIN == "1234" OR PIN == "4321". The June 2024 mark scheme says outright not to accept a range check that leaves the variable out.

Quick fix: Each side of an AND/OR should still make sense if you read it on its own.

3. Getting boundaries wrong by one

What goes wrong: In 2025, candidates checking a range from 1 to 100 often wrote num > 1 AND num < 100, which rejects 1 and 100. In the 2025 ticket-booking question, tickets > num failed when the number of tickets left exactly matched the request. In 2024, maths symbols such as ≥ were not allowed, and the mark scheme rejected => because it is the wrong way round.

What examiners want: >= and <= where the boundary values count as valid, typed as you would on a keyboard. Remember too that an ERL loop such as for count = 0 to 5 includes 5, while Python's range(0, 6) stops before 6. The 2024 mark scheme accepted the correct end value for either style.

Quick fix: After writing a condition, try the boundary values in your head. The 2025 report notes candidates often did not check boundary cases.

4. Mixing AND and OR without brackets

What goes wrong: In 2023, many candidates wrote if SystemArmed AND DoorSensorActive OR WindowSensorActive then. Because AND is evaluated before OR, the alarm could go off when the system was not armed. Many lost a mark this way. In 2022, using != with or made every valid entry fail, and the 2025 report again lists multi-condition IF statements as a weakness.

What examiners want: Brackets, nested ifs or separate checks, for example if SystemArmed AND (DoorSensorActive OR WindowSensorActive) then. For rejecting invalid values, the 2022 report accepts != combined with and as correct (or == with or to check for valid values).

Quick fix: If a condition uses both AND and OR, add brackets. Then test it with one value that should pass and one that should fail. Our Boolean logic guide covers the operators.

5. Functions that ignore their parameters, or print instead of return

What goes wrong: In 2024, examiners called a procedure question with given parameters an excellent discriminator between candidates. Many began by asking the user for input, which overwrote the parameters. The 2025 report records the same problem with functions: the parameter was missing, input was used inside the function, and the price was printed rather than returned. Few candidates could then call the function correctly. In 2022, calculating the answer without defining a function at all earned few or no marks.

What examiners want: Data passed in through parameters and a value passed back with return, for example function ticketPrice(num) … return num * price … endfunction, called with total = ticketPrice(3).

Quick fix: If a function has a parameter, there should be no input inside it. If the question says "return", there should be no print inside it.

6. Careless trace table entries

What goes wrong: The reports list wrong line numbers (2023, 2024), outputs that never happen (2023, 2024), and in 2022 few candidates traced the loop all the way through to the final value. In 2024, writing "x" in the output column to mean "no output" was ambiguous and could not be credited. The mark scheme treats anything in that column as an output. In 2022, a stray space in a string cost marks, because "ab" and "a b" are different strings.

What examiners want: Correct values in the order they change, with the output column left blank when there is no output. From 2025, OCR says it awards trace table marks per set of variable changes rather than per line number, and will keep doing so.

Quick fix: Trace to the very end of the algorithm, and leave empty cells blank.

7. Concatenation, output and assignment slips

What goes wrong: In 2024, many used a comma to "join" strings (in Python a comma separates items rather than joining them), printed the result when it had to be stored in message, or changed the given variable names (wordone for word1). In 2025, putting a variable name inside quotation marks printed the word instead of its value. In 2022, many wrote score + 1 without storing the result, and score =+1 was rejected because it sets score to positive 1.

What examiners want: message = word1 + " " + word2, print("Total: " + str(total)) and score = score + 1 (the 2022 report also accepted score += 1).

Quick fix: Copy identifiers exactly as the question writes them, with no spaces in variable names (a weakness noted in 2024).

8. Array index and loop errors

What goes wrong: In 2024, candidates wrote for x in list, where x is an item and not an index, and then wrote list[x]. In 2022, many did not see that a running total was reset to zero inside the loop, and some found the bug without saying where the line should go. In 2025, fewer candidates could define an array as having a fixed length (lists, by contrast, can be appended to), and the question asking for a full record was the lowest-scoring question on the paper.

What examiners want: Loops that visit every element from index 0, totals set up before the loop, and a clear understanding that a record is one row of a table. The 2024 report also favoured simple, working solutions over elaborate ones.

Quick fix: If you use Python, practise the topics the 2025 report says are not easily covered in Python: arrays, do … until loops, and switch/case (Python has match/case only from version 3.10).

9. SQL syntax errors

What goes wrong: SQL errors appear in all four reports. They include SELECT ALL and IF in place of WHERE (2022), leaving out one of the conditions (2023), spaces in field or table names and misspelt table names (2024), and spaces in names and missing quotation marks around text (2025). In 2025, very few candidates scored full marks on the SQL question.

What examiners want: Field names separated by commas, the table name spelled exactly as given, WHERE for the condition and quotes around text, as in the 2025 answer: SELECT ActId, Stage FROM TblMusic WHERE Day = "Saturday". Use SELECT * for all fields.

Quick fix: Compare your query with the table in the question, letter by letter.

Algorithm and theory mistakes

10. Merge sort without proper merges

What goes wrong: In both 2022 and 2025, examiners flagged the same misconception: joining lists together and then sorting the result. In 2022, writing only the final sorted list earned nothing, and using a different sort scored zero.

What examiners want: Split the list down to single items, then merge so that each merge produces a sorted list (sizes 2, 4, then 8). The full-mark answer shown in the 2025 report drew boxes around each list, which the examiners called best practice.

Quick fix: Show every merge stage, not just the answer. See our standard algorithms guide.

11. Vague search descriptions

What goes wrong: In 2022, the most common mark for describing a binary search was 3 out of 4, because candidates covered "higher" and "lower" but left out the case where the value is found and the search stops. In 2022 and 2025, linear search descriptions had weak stopping conditions, such as stopping when the value is found, when the value wasn't in the list.

What examiners want: All three binary search cases, and for linear search: start at the first item, check each item in turn, and stop when the item is found or the end of the list is reached.

Quick fix: Write an algorithm description as numbered steps that a person could follow exactly.

12. Giving examples instead of definitions, and finding errors without fixing them

What goes wrong: In 2023 and 2024, many defined a syntax error with an example, such as a missing bracket, which was not credited as a definition. In 2023, many candidates found the lines containing logic errors but few corrected them. In 2022, some did not explain the fix.

What examiners want: A definition first. The 2024 report describes a syntax error as breaking the rules of the language, so the program will not run or compile. Then, for debugging, give the line number and the corrected code.

Quick fix: "Identify and correct" means two separate jobs, so do both.

13. Confusing validation, testing and test data

What goes wrong: The 2023 report says candidates confused input validation with testing. They described test data (normal, erroneous) when asked for types of testing, and suggested validating values the user never enters. The 2024 report notes candidates confusing maintainability with testing.

What examiners want: Iterative and final (terminal) testing as test types; validation applied to user input; and test data given as actual values. The 2024 mark scheme did not accept a description such as "a value between 40 and 180" as test data. The 2025 report says invalid and erroneous data are grouped together in exam questions.

Quick fix: See our robust programs guide for defensive design and testing terminology.

14. Generic answers when the question gives a context

What goes wrong: In 2022 and 2024, candidates suggested indentation to improve maintainability when the code was already indented (or didn't need it). In 2024, textbook definitions of abstraction and decomposition earned nothing without the sports day scenario, and vague inputs such as "video" were not credited.

What examiners want: Answers about this code or this scenario, such as "name of video" rather than "video". In 2022, "use a subroutine" on its own was not enough without describing how it would be used.

Quick fix: Use a word or identifier from the question in every sentence. Our command words guide explains what "describe" and "explain" add.

15. Logic gate and flowchart symbol errors

What goes wrong: The 2022, 2024 and 2025 reports all mention NOT gates drawn without the circle (which makes them buffers), and the 2022 and 2025 reports also warn against AND/OR gates drawn with a circle (which makes them NAND/NOR). In 2023, many missed the NOT gate needed for "only at night". With flowcharts, 2022 saw non-standard symbols, and in 2024 fewer candidates labelled decision branches or connected every path to the end.

What examiners want: Gates marked on their shape (labels are ignored), truth tables with 2 to the power n rows for n inputs (8 rows for 3 inputs), counted in binary, parallelograms for input/output, diamonds for decisions, and Yes/No or True/False on every branch.

Quick fix: Underline each condition in the question and make sure it appears as a gate or a decision.

How to use your mock to fix these mistakes

  1. Sit it under the real timings. About 50 minutes for Section A and 40 for Section B, in one 1 hour 30 minute sitting.
  2. Attempt every part. In 2023 and 2024, stronger candidates attempted everything and picked up partial credit. Examiners also use follow-through marks, so an early error is usually penalised only once.
  3. Sort your lost marks into three groups: things you didn't know, precision slips (most of the list above) and questions you didn't attempt. Each group needs a different fix.
  4. Type up your Section B answers and run them. The 2022 and 2023 reports both recommend more practical programming time. Running your code with boundary values will show up mistakes 2 to 5 straight away.
  5. Read the examiners' report with each past paper. You can find the official papers via our OCR past papers page, and the 2025 report recommends studying the ERL section of the specification.

As of November 2026, Paper 2 is scheduled for Wednesday 19 May 2027 (afternoon). See our J277 exam dates for 2027 to plan your revision.

FAQ

Can I use Python in OCR J277 Paper 2?

Yes. Questions that ask for code accept ERL or any high-level language you have studied, and the 2022, 2024 and 2025 examiners' reports confirm you are not penalised for your choice of language.

Do I need to memorise OCR Exam Reference Language?

No. OCR says you need to be familiar enough with it to understand the questions, because code in the paper is written in ERL. You can answer in your own language.

Are flowcharts allowed in Paper 2?

Yes in Section A, unless the question says otherwise, and for Design questions in Section B. They earn no marks in Section B questions that require code.

Will I lose marks for small syntax errors?

Usually not. OCR says minor slips such as a missing colon are not normally penalised, and letter case is ignored in Section B. Errors that change the meaning, such as 7 = x or a condition missing its variable, do lose marks.

How much of Paper 2 is writing code?

OCR's guide says 10–15% of the 80 marks (8 to 12 marks) test precise algorithm writing. Many other marks need you to read, trace, fix or describe code.

For topic-by-topic notes, flashcards and past paper links, start at the free GCSE Computer Science hub. If you would like a teacher to go through your mock with you, you can book a free 1-hour trial lesson.