0% found this document useful (0 votes)
3 views

#Introduction to Python Lesson One Teaching Ideas

This document outlines the first lesson in a series on Python programming, focusing on using Python IDLE to solve computational problems. It includes objectives, success criteria, and activities designed to introduce students to Python, its syntax, and basic programming concepts such as input and output. The lesson emphasizes collaborative learning and provides resources for further study and home learning activities.

Uploaded by

Abdul Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

#Introduction to Python Lesson One Teaching Ideas

This document outlines the first lesson in a series on Python programming, focusing on using Python IDLE to solve computational problems. It includes objectives, success criteria, and activities designed to introduce students to Python, its syntax, and basic programming concepts such as input and output. The lesson emphasizes collaborative learning and provides resources for further study and home learning activities.

Uploaded by

Abdul Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to Python: Lesson One

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.

• To use Python to perform calculations.

• To write simple programs that respond to user input.

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.

Page 1 of 3 visit twinkl.com


Main Activities
What Is Python?
• The file: askMonty.py is a Python program. Using the PowerPoint introduce the Python programming language.
• Your students might be interested in the origins of the name Python, and the organisations such as Yahoo, Google and NASA
that use Python. It might also be a useful exercise to ask students to see if they can research any other organisations that use
the Python programming language.
• It is worth pointing out that Python is a text-based language, unlike the visual ‘blocks’ languages such as Scratch or Kodu that your
students may already have had experience with. Scratch et al, although fun and good for learning, are not generally used for professional
or commercial projects. People who program for a living generally use text-based programming languages such as Python.

Starting Python IDLE


• Using the screenshots on the PowerPoint demonstrate how to start Python IDLE in the default Interactive mode.
• Demonstrate how to open a new instance of a Script mode window.
• Note: it is good practice to open instances of both Interactive and Script modes at the same time, both being visible on screen.
• Explain the meaning of key terms: IDLE, Interactive and Script modes: An Integrated Development Environment contains all
the tools needed to write, test and run computer programs. In Python we use the acronym IDLE. Other programming languages
sometimes use the shorter acronym IDE for Integrated Development Environment. Python IDLE has two modes of running.
The Interactive mode gives immediate feedback to every line of code that is entered, and is useful for testing ideas and small
snippets of code. The Script mode allows a programmer to type in many lines of Python code, and then save the code as a single
program with a file name. This file can be saved and run at any time. However, any inputs or outputs of Python programs will
always be shown in the Interactive mode.

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.

Page 2 of 3 visit twinkl.com


Incredible Inputs
• This is where things start to get much more interesting, but also more complex for many students. Using the screenshots on the
PowerPoint slides demonstrate how to use the input command. This command is invariably used with a variable and assignment
(=), in this form: <variable_name> = input(“<a question goes here>”).
• Using the screenshots on the PowerPoint slides demonstrate how this line of code works, by outputting the question on screen,
waiting (indefinitely) for the user to type something in, and storing whatever the user enters into a variable for use later on.
• Conclude this section with differentiated Incredible Inputs Activity Sheet.

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.

Page 3 of 3 visit twinkl.com

You might also like