Single lesson · Key Stage 3

Data types and calculations – Year 7 Computing lesson

Pupils learn to choose the right data type for a value, convert input to a number and use arithmetic operators to calculate the ingredients for a scaled recipe.

Also in a bundle Introduction to Python – Year 7 Computing lessons 6 lessons for £20 · save 16% on buying separately

Lesson 3 of 6 in unit 7.6 Introduction to Python, taught in Year 7, Summer 2. It answers one big question: How does Python do maths with the numbers we type in?

By the end, pupils can choose the right data type for a value, convert input to a number and use arithmetic operators to calculate the ingredients for a scaled recipe.

The Build (the main task)
Write a recipe scaler that asks how many people to feed, converts the answer to an integer and calculates the flour, milk and eggs needed for a pancake recipe that serves 4.
Support version
Part-filled code: the input, the int conversion and the flour line are written; pupils complete the milk and eggs calculations.
Challenge
Use // and % to work out how many full boxes of 6 eggs to buy and how many eggs are left over.
Real-world link
Scaling the 4-person pancake recipe to feed the whole food technology class.
Key words
Data type, Arithmetic operator and Calculate, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“"5" and 5 are the same, so the answer from input can go straight into a sum”; “Python works out a calculation from left to right, so 100 + 50 * 2 is 300”.
National Curriculum
NC3 (two or more languages, at least one textual; data structures; modular programs with procedures or functions); NC4 (boolean logic (AND, OR, NOT) in circuits and programming; binary numbers, addition and conversion).

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 Introduction to Python 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 KS3 Computing

See all

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