Arithmetic operators, including MOD and DIV – OCR GCSE Computer Science lesson (J277)
Pupils learn to use +, –, *, /, powers, DIV and MOD in Python and in exam pseudocode, and use DIV and MOD to split a total into groups and a remainder.
Lesson 8 of 13 in unit 10.1 Systems Architecture and First Programs, taught in Year 10, Autumn 1. It answers one big question: How can a program share things out into equal groups?
By the end, pupils can use +, –, *, /, powers, DIV and MOD in Python and in exam pseudocode, and use DIV and MOD to split a total into groups and a remainder.
- The Build (the main task)
- Write a Python program that asks how many pupils are going on the trip and uses DIV and MOD to print the number of full minibuses of 16 and the number of pupils left over.
- Support version
- Part-filled code: the input and casting are written; pupils complete the two calculation lines and the print lines.
- Challenge
- Explain how MOD can be used to test whether a number is even.
- Real-world link
- The trip planner works out how many full minibuses of 16 a trip needs and how many pupils are left over.
- Key words
- MOD, DIV and Remainder, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “DIV rounds to the nearest whole number, so 7 DIV 2 is 4”; “MOD gives the decimal part, so 7 MOD 2 is 0.5”.
- OCR J277 specification
- 2.2.1 (programming fundamentals: variables, constants, operators, input, output, assignment, sequence).
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 Systems Architecture and First Programs 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 allPupils learn to describe a computer system as input, process, storage and output, and write an algorithm as precise numbered steps for a stated purpose.
Free sample lessonPupils learn to decompose a problem into smaller sub-problems in a structure diagram and use abstraction to decide which details a solution needs and which it can ignore.
Pupils learn to state the purpose of the CPU and describe von Neumann architecture, in which instructions and data are stored together in the same memory.
Written for the specifications named. Not endorsed by or affiliated with any exam board.