#Introduction to Python Lesson One Teaching Ideas
#Introduction to Python Lesson One Teaching Ideas
Teaching Ideas
Learning Objective: To use a textual programming language to solve a variety of computational problems.
(From National Curriculum Computing programmes of study: key stage 3: subject content: statement 3.)
Success Criteria: • To know how to start Python IDLE and run a Python program.
Context: This is the first of a series of six lessons on the topic: Introduction to Python. Python is a popular
programming language and is easy to learn. There are many advantages to using Python in teaching
programming in schools: firstly it is free and relatively easy to install on a school network (there are
many free online versions if installation is not possible); Python is available for Windows, Mac OS X
and Linux/UNIX operating systems; there is a huge wealth of available resources produced by exam
boards, schools and 3rd parties; Python is widely used by universities to teach programming, so any
learning at this level may pay dividends later on; and Python can also provide students with very
quick success and visual results which is perhaps the most important advantage of all.
Python can be downloaded from the main website. It is recommended that you download Python
version 3 (e.g. Python 3.6.3). Python 2 has a slightly different syntax.
Key terms and concepts are fully explained within the PowerPoint resource which will be of
particular use for non-specialist and cover teachers. Python Code Examples are also included where
appropriate. Within this lesson students are introduced to the Python IDLE (Integrated Development
Environment) and are encouraged to run and experiment with a fun pre-made Python program; they
will learn how to write simple programs that respond to user input, and how to perform calculations
with the print command. There are opportunities within the learning Activities to work in groups and
pairs with immediate feedback to formative and self-assessment; such strategies are particularly
effective in supporting PPI, EAL and SEND learners. The accompanying Activities are differentiated
for low and middle/high ability learners, and answers to all of the Activity questions are provided.
Additional Home Learning Activities with answers are also included. The knowledge and skills
gained in this topic will provide excellent preparation for further study with programming languages
and problem solving. The skills learned in this topic will also provide invaluable preparation for non-
examined-assessment (NEA) at GCSE level Computer Science.
Hello World
• A great programming tradition: the first program that most programmers write is often a “Hello World” program.
• Using the screenshots on the PowerPoint introduce students to the print command and how to write text to the screen.
• Even at this tender early stage some students will make mistakes and it won’t work for them. You are encouraged to reassure
them that all the best programmers make errors every day. Very few programs work first time. Look out for these common errors:
omitting one or both “quotes”, omitting one or both (brackets), misspelling of print, or typing their code into the Script mode
window instead of the Interactive mode window. Important lessons are learned at this stage.
Cool Calculations
• Up to this point we’ve used print to output only text. Now we get to the numbers.
• Using the screenshots on the PowerPoint slides demonstrate how to use the print command to execute calculations. The main
difference is not to use “quotes”. Younger students may need to be shown where to find the asterisk (*) and slash(/) characters
on the keyboard as these are used for multiplication and division.
• Python uses BIDMAS so answers should usually be correct. However it is worth pointing this out to your students.
• Python uses % for ‘modulo division’, which simply returns any remainder of a division. E.g. 10 % 3 = 1 (remainder 1).
• Python uses // for ‘integer division, which simply returns the whole number part of a division. E.g. 10 // 3 = 3.
• Issue Cool Calculations Activity Sheet for students to complete.
Plenary
Let’s Bring It All Together
At the conclusion of the lesson select individual students to tell you one new thing which they have learned today. To mix things
up a bit you could use a random name picker (there are many available online, this one is worth a look). Alternatively pick a student
and ask them to pick someone else to give the next answer. Try to avoid asking for hands-up; better to select those who would
benefit from being challenged.
As a prompt, ask students to give a definition for each of the key words: IDLE, print, input, variable (these definitions can later
be displayed on the final PowerPoint slides).
Rate Your Progress
Give students a few moments to look back at the learning objective and success criteria and reflect on their learning. For each
criteria they can rate their own progress using a traffic light system, whereby green light means that they feel fully confident with
this objective and understand it well; amber light means that they have understood most of the objective and are happy with their
progress; red light means that they have understood some of the objective and will think about it some more, perhaps asking a
friend or teacher for help later on.
Nailing It Down
Inform the class that in the next lesson they’ll learn about Python data-types. Encourage your students to download Python
themselves at home for free by visiting here (or by just searching for ‘python’ using their favourite search engine).
There are also lots of free online versions of Python which are great for learning how to code. Encourage your students to try
out some of these links:
https://snakify.org/
http://pythontutor.com/
https://hourofpython.com/
https://repl.it/languages/python3
Home Learning
Issue the Clever Calculations Home Learning Activity Sheet for students to complete at home and bring in next week. This
activity is designed to be completed without the need for access to a computer; answers are provided.