Back to Data Types And Structures
N
Oak National Academy
Lessons written by expert teachers in England, each with slides, a video and quizzes.
- Their topic:
- Programming: strings and lists · Python programming with sequences of data
- For your topic:
- Data Types And Structures · Computer Science - 4CP0
Use these lessons alongside our lesson note, which covers your syllabus in full.
What this covers in your syllabus
-
Understand the need for, and understand how to use, data types (integer, real, Boolean, char, string)
Not covered here. Our lesson note covers it.
-
-
-
Understand the need for, and how to use, variables and constants
Not covered here. Our lesson note covers it.
-
Understand the need for, and how to use, global and local variables when implementing subprograms
Not covered here. Our lesson note covers it.
3 lessons from Oak National Academy
Lesson 1 of 3 · GCSE level, ages 14 to 16
2D arrays and lists
By the end:
I can define and use two-dimensional lists.
Key learning points
- A list is used to hold multiple elements under one name.
- A two-dimensional list allows you to hold a list as one element.
- Data in a 2D list can be held in rows and columns.
Keywords
- list
- a dynamic data structure that can contain items of different data types
- two-dimensional
- describes a list or array that has both columns and rows of values
- array
- a static data structure that contains items of the same data type
A common mistake
Mistake: Arrays and lists behave in the same way.
In fact: An array has a predefined fixed size. A list can vary in size throughout program execution.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
Lesson 2 of 3 · GCSE level, ages 14 to 16
Arrays and lists
By the end:
I can describe the differences between lists and arrays and use a list in a program.
Key learning points
- Data structures are used to store data in an organised and accessible way.
- Data structures can be static or dynamic.
- Static data structures reserve memory locations for a set amount of data. Their size cannot change.
- Dynamic data structures are more flexible. The memory capacity is not fixed.
Keywords
- static
- a data structure that has a fixed size in memory
- dynamic
- a data structure that can grow or shrink to accommodate items
- array
- a static data structure that contains items of the same data type
- list
- a dynamic data structure that can contain items of different data types
A common mistake
Mistake: Arrays and lists behave in the same way.
In fact: An array has a predefined fixed size. A list can vary in size throughout program execution.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
Lesson 3 of 3 · Lower secondary, ages 11 to 14
Iterating through data structures
By the end:
I can use iteration to repeatedly add items to lists and check the contents of a string.
Key learning points
- Condition-controlled iteration is implemented using while loops in Python.
- A string is like a list in structure but is immutable, so elements cannot be changed, added or removed.
- Some operations that can be performed on lists can also be performed on strings.
Keywords
- iteration
- the process of repeating a sequence of instructions within a program loop
- string
- a sequence of characters, e.g. letters, numbers, spaces, and other symbols
- mutable
- able to be changed
- immutable
- not able to be changed
A common mistake
Mistake: Strings are mutable meaning that any character within the string can be changed.
In fact: Strings are immutable. The elements of a string cannot be changed. If changes to the string are required, the whole string must be rewritten.
Check what you learned
From Oak National Academy's exit quiz. Choose every answer that is right.
A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0.
Read the licence
The wording comes from each publisher. The layout and the links to your syllabus are ours.