Single lesson · Written for OCR J277

Extended programming problems 2 – OCR GCSE Computer Science lesson (J277)

Pupils learn to decompose a Section B problem into a function with parameters and a main program, and write it as logical, testable steps in Python or OCR Exam Reference Language.

Also in a bundle Impacts of Technology and Full Papers – OCR GCSE Computer Science lessons (J277) 11 lessons for £39 · save 11% on buying separately

Lesson 6 of 11 in unit 11.3 Impacts of Technology and Full Papers, taught in Year 11, Spring 1. It answers one big question: How do you plan a long programming answer?

By the end, pupils can decompose a Section B problem into a function with parameters and a main program, and write it as logical, testable steps in Python or OCR Exam Reference Language.

The Build (the main task)
Write a function fare(age, zones) that returns the TapRide fare – under 5 travel free; ages 5 to 15 pay £1 per zone; 16 and over pay £2 per zone – and a main program that asks for a passenger's age and number of zones and outputs the fare. You may use Python or OCR Exam Reference Language.
Support version
Parsons problem with one distractor line that prints instead of returning.
Challenge
Validate zones (1–3) and total the fares for a family of four.
Real-world link
TapRide works out each passenger's fare from their age and how many zones they travel through.
Key words
Function, Parameter and Logical, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“A function can print its answer instead of returning it – it does the same thing”; “The argument's name must match the parameter's name”.
OCR J277 specification
2.1.1; 2.1.2; 2.2.1; 2.2.3 (functions and parameters); 2.3.1.

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Pupils need computers for the main task.

Also sold in the Impacts of Technology and Full Papers unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Single-teacher licence: use and adapt it with your own classes

More for GCSE Computer Science (OCR)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.