New
New
Year 10
AQA

Structured programming

I can describe what is meant by a structural approach to programming and explain the benefit of this approach.

New
New
Year 10
AQA

Structured programming

I can describe what is meant by a structural approach to programming and explain the benefit of this approach.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. As programs grow in complexity it becomes useful to structure them in a way that is more manageable for the programmer.
  2. A structured approach to programming uses a module approach where a program is seperated into subroutines.
  3. A program can be decomposed into smaller subroutines that are easier to solve indepedently.
  4. The interface determines how data will be passed in and out of the subroutine.

Keywords

  • Subroutine - a sequence of instructions to perform a specific task with an identifiable name

  • Interface - describes how a subroutine will interact with the main program

  • Identifer - a name for a variable or subroutine

  • Parameters - used in a subroutine to allow values to be passed into them

Common misconception

A program must run line by line from top to bottom.

A subrotuine is an 'out of line' block of code, which is typcially written at the top of a program and then called upon within the main program.


To help you plan your year 10 computer science lesson on: Structured programming, download all teaching resources for free and adapt to suit your pupils' needs...

This topic links with the concept of decompostion. Encourage pupils to think in high-level terms about what a program needs to do by using a heirachy diagram to plan the parts of a program rather than just diving in and coding.
Teacher tip

Equipment

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

Download quiz pdf

6 Questions

Q1.
Programming languages are considered to be high or low level. Which of the following languages are high level?
machine code
Correct answer: C#
Correct answer: Python
assembly language
Q2.
What Python function is used to display output?
input()
output()
Correct answer: `print()`
display()
Q3.
What operator is used for multiplication in Python?
%
/
Correct answer: `*`
+
Q4.
What is the value of the variable total once the code has finished executing?
123456
total = 0 FOR i = 0 TO 3 FOR j = 0 TO i total = total + i NEXT j NEXT i
Code colour

When programmers write code, they use a special tool called an IDE (Integrated Development Environment). In an IDE, different colours are used to help programmers understand the code:


  • • Blue - numbers and boolean values
  • • Green - strings
  • • Purple - keywords
Correct Answer: 20
Q5.
What data type is used in Python to hold whole numbers?
Correct Answer: integer, int, int()
Q6.
Which type of loop is used for condition controlled iteration in Python?
Correct answer: `while`
loop
now
for
forever

Assessment exit quiz

Download quiz pdf

4 Questions

Q1.
The structured approach to programming provides many benefits. From the list below, select the statements that specify a benefit of using the structured approach.
Correct answer: Subroutines make use of return values so the use of global variables is reduced.
A structured program will execute more quickly.
Correct answer: Subroutines are easier to test because they perform a single task.
Correct answer: Meaningful identifiers for subroutines help to make the program code readable.
Correct answer: It is quicker because many subroutines can be worked on at the same time.
Q2.
Select the statement that is true.
A subroutine must be defined and executed at some point in the program.
Correct answer: Subroutines make programs easier to read and understand.
Procedures allow values to be returned to the procedure call.
Q3.
A student wants a subroutine that will add any two given numbers together and display the answer. Use the lines of code below to construct a
display_sum
subroutine for them.
1 -
def display_sum (num1, num2):
2 -
answer = num1 + num2
3 -
print(answer)
Q4.
What is num1 in this line of code?
def display_sum (num1, num2):
identifier
return value
Correct answer: parameter
variable