Fundamentals-of-Programming-Teaching-Guide
Fundamentals-of-Programming-Teaching-Guide
Introduction
This teacher’s guide contains a detailed lesson plan to accompany the set of PowerPoint slides and
worksheets for each topic.
The lesson plans are designed to form a basis for ideas for the teacher and should be adapted to suit the
teaching style and preferences of the individual teacher, and the resources and nature of the individual school
or Computing / ICT department.
The material supplied for this unit includes:
6 PowerPoint presentations, each designed to cover one topic, which may take more than one lesson
6 worksheets
6 homework sheets
approximately 40 programs written in Python, illustrating how the pseudocode answers to worksheets and
homework translate into code
the same number of programs written in Visual Basic
An end-of-unit test for assessment purposes
Summary
This unit covers the fundamentals of programming, while recognising that some students may have had little
previous experience of programming and others will already be seasoned programmers. It covers Section 3.1
of the specification, including the principles of structured programming in a procedural language such as
Python or Visual Basic, arrays, subroutines, parameter passing and text and binary files. Each of the six topics
may be spread over more than one lesson, especially if time is spent in the lessons coding solutions and going
over homework tasks.
The unit does not teach any particular programming language, leaving this choice up to the teacher. These
theory lessons could be run in parallel with practical programming sessions, and it is recommended that
students code the pseudocode solutions that they write to give extra experience in practical programming.
Learning Outcomes for the unit
Some programming experience in a high level language will be useful for this unit. It is expected that practical
programming lessons will take place in parallel with or prior to studying this unit. Students should have a basic
understanding of computer systems from lessons delivered as part of the Key Stage 3 national curriculum and
preferably also a GCSE course in Computer Science.
Vocabulary
Vocabulary associated with this Unit, such as:
algorithm, structured programming, data type, variables, constants, assignment, arithmetic operations, Boolean
operators, sequence, selection, definite and indefinite iteration, top down design, modular programming,
subroutine, procedure, function, parameter, argument, exception handling, global and local variables, field,
record, binary file, text file, data structure
Assessment
Students will sit an end-of-unit test.
A few points to note:
These are not live assessment questions. They have all been created from scratch for this scheme of work,
and the format is different from that of A Level Paper 1 which relates to a large extent to preliminary material
studied over a long period. This test requires students to apply the programming knowledge and skills they
have learned while studying this Unit and has questions of varying levels of difficulty for a range of abilities.
Real exam papers go through a serious quality assurance process; feel free to use and adapt these questions
as you see fit.
Lesson plans
Topic 1 Programming Basics
Preparation:
Before each lesson you will need to make copies of the worksheets and homework sheets
to give to students. These will serve as valuable notes and so you should encourage them
to keep these in a ring binder as reference. If you are teaching Python or VB as the
programming language, additional help is provided in the form of program solutions to
most of the algorithms in every worksheet and homework.
Although it is not essential to code the programs for which pseudocode is produced, it
would be an advantage and provide valuable programming practice.
Learning Objectives:
Define what is meant by an algorithm and pseudocode
Learn how and when different data types are used
Learn the basic arithmetic operations available in a typical programming language
Become familiar with basic string handling operations
Distinguish between variables and constants
Write pseudocode solutions to simple problems
Content Resources
Starter
There may be a great deal of variation between students in the PowerPoint Guide:
amount of programming experience they already have. For Fundamentals Topic 1
some it may be a new skill to be learned, others may already Programming Basics.ppt
be capable programmers, and the worksheet tasks in this first
lesson will help you discover how fast you can proceed.
Show the first slide and introduce the topic and key objectives.
Explain that this first lesson is about developing skills and
building blocks to allow development of effective algorithms to
solve a wide range of tasks.
Remind the students that the focus is on key constructs that
can be implemented across a number of different
programming languages which share a common core.
Ask students to suggest instructions for getting a robot to carry
out simple tasks, such as moving from a particular desk in the
classroom to the door, drawing a number of concentric circles,
calculating the total value of a bag of mixed coins.
Main
Ask for a definition of an algorithm, and then show the slide.
Introduce the “calculate paint problem” and encourage the
students consider input, calculation, output and simple
arithmetic operations such as +, -, / and *(multiply).
Hand out Worksheet 1 and ask students to do Task 1. Fundamentals Worksheet
Discuss answers that students have written. 1 Programming
basics.docx
Pseudocode
Fundamentals Worksheet
Determine what programming statements students are familiar 1 Answers.docx
with and describe the need for pseudocode, which bridges the
gap between English and coding syntax within a particular
language. Remind students that in some instances problems
may be developed by teams working in pseudocode without
knowledge of the target programming language that the
algorithms will be implemented in.
Data Types
Introduce the concept of data types and ask how the type of
data might differ. Ask why it is necessary to know what type of
data is being declared. Lead them to an understanding that
different data types use different numbers of bytes and are
stored in different formats.
Not all languages require data types to be declared.
Describe the difference between variables and constants, and
why constants are sometimes useful.
Ask students to work through the questions in Worksheet 1
Task 2. Go over the answers when they are ready.
String Handling
Ask students what a name is composed of – a list of
characters. Introduce the notion that each letter in a name
has an index or position starting from 0 or possibly 1 when
implemented in a language. Once it has been established that
elements have an index, consider how to access, say, the
third element in a name.
In all pseudocode in this unit, it will be assumed that the index
starts at 0.
Discuss the existence of a number of language-dependent
functions that take strings and return data such as length,
substrings and searches for characters.
Python program PP1
Ask students to come up with an algorithm for writing a 5-
ReverseString.py
character string in reverse order.
You could do this with:
Name = (“a”, “b”, “c”, “d”, “e”)
reverseName(0) = name(4)
reverseName(1) = name(3)
PP1 reverse string.py
etc.
The sample Python program in the folder gives a more
sophisticated solution, and if you have experienced
programmers in the class, they could come up with a better
algorithm and code it as an extra task. (They may find it can
be done with a single statement using an appropriate string-
handling function! It would be a good exercise for some PP1 Surname and
students to look up string handling functions on the Internet initial.py
and use some of them. Can they take a name like “Fred
Jones” and print out “Jones F”? There is a Python solution in
the folder).
Fundamentals Homework
Plenary 1 Programming
basics.docx
Go over the Worksheet answers.
Fundamentals Homework
Assess students’ understanding of algorithms, pseudocode, 1 Answers.docx
assignment, variable, identifier, operator, sequence, data
types and string handling. Python and VB coded
programs in folders