Introduction to Python – Year 7 Computing lessons
Six Year 7 lessons moving from blocks to Python: print, variables, input, data types, calculations, if and else, and testing.
Year 7 pupils already think like programmers in blocks; this unit moves them to Python, the text-based language they will use for the rest of key stage 3. Pupils learn to write precise instructions that Python can follow: output with print, storing and asking for data with variables and input, calculating with the right data types, and making decisions with if/else and comparison operators. They finish by testing their own recipe scaler for the food technology department, so they learn that a program is only finished when it has been shown to work.
Unit 7.6 is taught in Year 7, Summer 2, and answers one big question: How do we write text programs that solve real problems? Every lesson uses the same real-world context (writing small tools people actually use), and pupils make a converter or calculator for a real need, such as scaling recipes for food technology. The careers link is a software developer: a software developer turns what users need into precise code, then tests it before anyone relies on it – the same steps pupils take to build and test a recipe scaler for the food technology department.
What happens in each lesson:
Lesson 1, From blocks to text: print: How do we give a computer instructions in text, not blocks? Main task: write a Python program that prints a pancake recipe card: a title, three ingredients and one method step, each on its own line, with no syntax errors.
Lesson 2, Variables and input: How can a program remember what the user types? Main task: write a program that asks the cook for their name and their recipe, stores each answer in a variable and prints a personal message that uses the constant OVEN_TEMP.
Lesson 3, Data types and calculations: How does Python do maths with the numbers we type in? 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.
Lesson 4, Selection with if and else: How can a program choose what to do next? Main task: write a program that asks how many people the recipe is for and uses if/else to tell the cook which bowl to use: the large bowl for more than 8 people, otherwise the small bowl.
Lesson 5, Comparison operators and testing: How do we prove our program makes the right decisions? Main task: complete a test plan for the bowl program: choose normal, boundary and erroneous test data, write the expected result for each, run the tests and fix the bug you find.
Lesson 6, Progress Check: 16-question check: 15 multiple-choice questions + one applied question on paper.
- Misconceptions it tackles include
- “Python will follow an instruction that is nearly right, such as Print("Hello") or print(Hello)”; “= means 'equals' as in maths, so count = count + 1 is impossible”; “"5" and 5 are the same, so the answer from input can go straight into a sum”. Each is planned into a hinge question before the main task or an exit question, so you find out who still holds it.
National Curriculum coverage (KS3 computing programme of study): 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.
It builds on 7.2 Algorithms and Block Programming (sequence, loops, variables and if blocks in Scratch) and 7.4 Binary (two states: on and off, True and False). 7.5 Images, Sound and Digital Media (designing for a real client and improving after feedback). It leads on to 8.1 Python: Iteration and Boolean Operators (casting, elif, AND, OR, NOT, for and while loops), 8.2 Boolean Logic and Circuits (conditions as logic gates), 8.6 Physical Computing (Python on a micro:bit) and 9.1 Python: Lists and Functions.
- Adapting it for your school
- Any Python 3 editor works: IDLE (installed with Python), Thonny, or an online editor your school allows. Check pupils can open, run and save a file before lesson 1. If you cut lesson 5, add one boundary test to the end of lesson 4 and teach the six comparison operators at the start of 8.1. Swap the recipe scaler for any small tool your school needs, such as a currency converter for a trip or a points calculator for sports day: every lesson keeps the same structure. OCR's exam reference language writes const, ^, DIV, MOD and endif; Python writes capitals names, **, //, % and indentation. Point this out to pupils who will take GCSE Computer Science.
Two versions in one download. The "With quiz" folder is for schools with a Code & Commerce Quizzes subscription: wherever the lessons use a Progress Check, its multiple-choice questions are ready-made on the quiz site for you to set, with a printed version as the backup. The "Without quiz" folder is the same teaching for standalone use, with no mention of the quiz site and every check on paper. You don't need a quiz subscription to use it.
What's included
- 6 lesson slide decks (PowerPoint)
- 6 lesson plans (Word)
- 6 worksheets, plus 5 support versions with scaffolds (Word)
- Medium term plan with intent, key words, misconceptions and adaptive teaching notes (Word)
- Progress Check lesson to assess the unit, with an applied question
- Comparison operators and testing - Quiz Quiz Trade Cards
- Department licence: every teacher in your department can use and adapt it
- Two versions of the files: one for Code & Commerce Quizzes subscribers and one for standalone teaching, no quiz site needed
In this bundle
Worth £24 bought separately at £4 a lesson. The bundle saves you 16%.
More for KS3 Computing
See allSix Year 7 lessons on logging on, files and folders, strong passwords, digital footprints, online risks and reporting concerns.
Free sample lessonSix Year 7 lessons from Bebras puzzles and flowcharts to block code: sequence, loops, variables and selection in a mini game.
Free sample lessonSix Year 7 lessons on input, process and output, hardware, the CPU and fetch–execute, memory, storage and operating systems.
Free sample lessonWritten for the specifications named. Not endorsed by or affiliated with any exam board.