Introduction to Programming using python 6 Lessons

vetinnocentSoftware and s/w Development

Nov 7, 2013 (3 years and 7 months ago)

90 views

Selby High School

Year 7 Scheme of Learning

201
3
-
201
4

Databases


Introduction to
Programming using python



6 Lessons

This modules is taught so allow
ks3
students
experience the fun of programming a computer. Python is used for its syntactical simplicity and short
learning curve before students are able to produce their own programs.

Lesson 1: Intro
to python

Objectives

Outcomes

Lesson outline

Resources

AFL

L
iteracy

Learn about python
as a programming
language


Learn about
expressions &
variables and their
use


Create several
successful programs


All
-
Level 4
-

State
what a
programming
language is and
what a program
is. Get half
marks on the test
(6/12)


Most
-
Level 5
-

Have used
variables and
with help get
75% on the test
(9/12)


Some
-
Level 6
-

Written their own
programs and
independently g
o
t
maximum marks
on the test.

Starter:

Research about
some keywords for python


Main:

Copy

the resources for the complete module

Briefly discuss why we teach python and
what is programming

Open and us idle shell to create their first
program “Hello World”

Learn about expression and their operators.

Students explore syntax by typing several
stat
ements into idle shell.

Learn about variables and that python is
case sensitive.


Plenary:

Complete the quiz

Explore the tdemo_spaceshp code

Python lesson 1

Powerpoint


Self
-
assessment

worksheet


Tdemo_spaceship

python code

Targeted
questions on
starter


Plenary quiz


Self
-
assessment
worksheet


Ability to type
the commands
in correctly

Lesson 2:
Datatypes, editor, IF statement

Objectives

Outcomes

Lesson outline

Resources

AFL

L
iteracy

Understand that
languages have data
types


Be able to use the
idle
editor to save
programs



All:
Know the
key data types
discussed in
lesson

To be able to
store a user input
variable with help

Write, save and
Starter:

Recap sample statements form last lesson


Main:

Recap on last lesson about keywords

Students then open the idle editor and type
a program in, save it and run it.

Discuss datatypes

Python lesson 2

Powerpoint


Self
-
assessment
worksheet


Random game


Starter
activity


Asking
questions task


Main
programming
challenge

Requirement to
type the
commands in
correctly


Requirement to
use Capital
letters and
Selby High School

Year 7 Scheme of Learning

201
3
-
201
4

Databases


Understand if
statement and
indentation


run your first
python program


Most:
Be able to
write these with
little help.


Some:
Independently
write these and
adapt them


Type
(or load) a random game and run it

and use this to discuss the IF statement and
indentation.

Students are then expected to modify the
game.


Plenary:

Complete the
self
-
assessment

sheet

Explore the tangram game

Tangram

python code



Self
-
assessment
worksheet


punctuation
appropriately.

Lesson
3
:
Functions & Comments

Objectives

Outcomes

Lesson outline

Resources

AFL

L
iteracy

Understand the
benefits of a function


Be able to write and
call a function


Understand how and
why we should use
comments in our
code


All:
To be able
to write a
function
-

with
help

and

be
able to add
comments to your
code


Most:
Be able to
write a these with
little help.


Some:
Independently
write these and
adapt them and
complete one of
the extension
tasks.

Starter:

Recap
variables & data

types

form last
lesson


Main:

Discuss what

a function is and that they
have already used them

Demonstration of s simple function

Students then create their own function to
ask the user their name

Comments are then discussed and students
are to create a second f
unction to add
numbers together.



Plenary:

Complete the
self
-
assessment sheet

Explore fractals in python


Python lesson 3

Powerpoint


Self
-
assessment
worksheet


Start
er

Activity


Main function and user
details functions
-

should the students
need them


Fractals folder in the
plenary



Starter activity


2 function
creating tasks


Self
-
assessment
worksheet




Requirement to
type the
commands in
correctly


Requirement to
use
short and
effective
language when
commenting
their code.

Lesson
4
:
Function return values and
boolean

expressions

Objectives

Outcomes

Lesson outline

Resources

AFL

L
iteracy

Understand a
branching statement
(if .. then .. else)


All:
written code
using
if..then..else
-

Starter:

Recap
expressions and function definition

form last lesson

Python lesson
4
Powerpoint


Starter activity


Self
-
assessment
Requirement to
type the
commands in
Selby High School

Year 7 Scheme of Learning

201
3
-
201
4

Databases



Understand about
indenting and blocks
of statements


Able to use a
function to create a
truth table

with help




written a
truth table in
code


Most:
Be able to
write a these with
little help.


Some:
Independently
write these and
adapt them and
complete one of
the extension
tasks.


Main:

Recap expressions and operators use

Students then
explore the if .. then ..else
statement and the requirements to indent
code.

Boolean truth tables are then discussed and
students write a program to evaluate their
outcomes


Plenary:

Students use their existing programs to
complete the truth tables.


Explore the u
s
e of the python turtle

Self
-
assessment
worksheet


Start
er

Activity


Plenary quiz


get_user_input_boolean
function



our_if python code


Truth_AND_full working

python code


Turtle_intro

python
code

worksheet



Targeted
questions for
expressions and
operators
recap


Plenary quiz





correctly


Requirement to
use short and
effective
language when
commenting
their code.

Lesson
5
:
While loops and the development process using pseudo code

Objectives

Outcomes

Lesson outline

Resources

AFL

L
iteracy

Understand how to
use looping
statement (while)


Understand to use
the break statement


Understand the
development process
of flow charts to
comments to code


All:
written code
using while
-

with
help




developed
programs using
pseudo code


Most:
Be able to
write a these with
little help.


Some:
Independently
write these and
adapt them and
complete the
extension tasks.

Starter:

Recap if statements form last lesson


Main:

Explain how while loops are constructed
using the while
statement


Introduce code development process from
pseudo code, through comments into code.


Student complete a development process to
create a program to count down form a
given number


The break statement is explained.


Students complete another
development
process to create an improved guess the
number game

Python lesson 5
Powerpoint


Self
-
assessment
worksheet


Starter Activity


Plenary questions


Subtract 1 program

Subtract 1 program
com
ments only

random number guess
v2

random number guess
v2 comments

Starter activity


Self
-
assessment
worksheet


Targeted
questions for
expressions and
operators recap


Plenary quiz





Requirement to
type the
commands in
correctly


Requirement to
use short

and
effective
language when
commenting
their code.

Selby High School

Year 7 Scheme of Learning

201
3
-
201
4

Databases



Plenary:

Students write 6 questions about python
coding



Lesson
6
:
mutli_select statements

Objectives

Outcomes

Lesson outline

Resources

AFL

L
iteracy

Understand what a
multi_selection
statement


Understand how to
use a multi_selection
statement


All:
written if ..
Elif .. Else code
using while
-

with
help


developed
programs using
pseudo code


scored 50% in
the plenary quiz


Most:
Be able to
write a these with
little help.


scored 75% in
the plenary quiz



Some:
Independently
write these and
adapt
them and
complete the
extension tasks.


sc
ored 90% in
the plenary quiz


Starter:

Recap if statements form last lesson


Main:

Introduce multi_select (if..then..elif…else)
statements to students


Student create their own function using
multi_select

statements


Class discussion on how that programming
task went


Students then create a joke telling program


using multi_selection and functions and



Plenary:

Students play the hangman game before
completing the end of unit quiz and record
their marks
in their excel progress sheet.



Python lesson 6
Powerpoint


Self
-
assessment
worksheet


Plenary quiz


Students own excel
progress sheet.


Starter activity


Self
-
assessment
worksheet


Programs
completed


End of unit test




Requirement to
type the
commands in
correctly


Requirement to
use short and
effective
language when
commenting
their code.

Selby High School

Year 7 Scheme of Learning

201
3
-
201
4

Databases