Community resourceWorksheet

J277 2 Paper 2 independent Section B mini-assessment

Part 4 of 5 · J277 Paper 2 · Exam transition

A 30-mark independent Section B mini-assessment, matching the total OCR gives to Section B.

Students will:

  • work from concise requirements, as in an examination
  • write a program that calculates league points
  • validate a score against stated rules
  • find the highest value in a set of scores
  • refine a program that does not yet meet its requirements

Inside: 7 explanation cells, 4 runnable Python tasks and 3 written answers. 30 marks, about 60 minutes.

Series: J277 Paper 2 · Exam transition, part 4 of 5.

Shared by Coding PathwayVerified teacher

  • 14 cells
  • About 60 minutes
  • CC BY-SA 4.0
  • Shared 17 Aug 2026
  • Updated 9 Sept 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Independent Section B mini-assessment

A community sports league records team scores. This 30-mark mini-assessment asks you to design, write, test and refine programs in a new context, matching the total available for OCR Section B.

Complete the assessment independently before using feedback. Write runnable Python in the code cells. The requirements are short and direct, but every task states the inputs, required result and any names the checks need.

Once you are familiar with the format, the complete assessment is designed for roughly the 40 minutes OCR advises for Section B. A first classroom attempt may be untimed so that running and checking code remains part of the learning.

Scenario requirements

Each match record contains a team name, points scored and whether the result has been confirmed. A valid points value is a whole number from 0 to 99 inclusive. The system must calculate points awarded for a result, find a highest score and test boundary behaviour.

Written answer4 marks

Decompose the league system into four suitable subproblems. For each subproblem, state one responsibility.

Use four distinct parts that could be designed and tested separately.

Students type their answer here.

Write: calculate league points

Complete league_points(scored, conceded). Return 3 for a win, 1 for a draw and 0 for a loss. The checks supply several score pairs. Do not ask for input or print the result.

Coding task5 marks
def league_points(scored, conceded):
    # Return 3 for a win, 1 for a draw and 0 for a loss.
    pass

Write: validate a score

Complete valid_score(score). Assume the parameter is an integer. Return True only for values from 0 to 99 inclusive and False for values outside that range.

Coding task3 marks
def valid_score(score):
    pass

Write: find a highest score

Complete highest_score(scores). The list always contains at least one integer. Inspect every element and return the largest value. Do not use Python's max() function: the task assesses the algorithm.

Coding task4 marks
def highest_score(scores):
    highest = scores[0]
    # Inspect the list and update highest when needed.
    return highest
Written answer8 marks

Create a four-row test plan for valid_score: one normal, two boundary and one invalid test. Include input, classification and expected result.

Select values that together test both ends of the accepted range.

Students type their answer here.

Refine

The function should count confirmed records. Each record is a dictionary containing team, score and confirmed. The current condition counts unconfirmed records instead. Correct the logic without changing the supplied records.

Coding task2 marks
def count_confirmed(records):
    count = 0
    for record in records:
        if record["confirmed"] == False:
            count = count + 1
    return count
Written answer4 marks

Explain two ways the completed solution could be made easier for another programmer to maintain.

Name each method and apply it to one of the functions in this assessment.

Students type their answer here.

Assessment review

Check that every function uses its parameters, returns the requested value and works beyond the displayed example. When marked, separate design, writing, testing and refining scores so the next revision task targets the weakest skill.