Computer Science GCES EDEXCEL
-
Decomposition And Abstraction Edexcel2 主题
-
Algorithms Edexcel11 主题
-
Follow And Write Algorithms Edexcel
-
Introduction To Programming Concepts Edexcel
-
Basic Programming Concepts Edexcel
-
Variables Constants And Assignments Edexcel
-
Data Structures And Arrays Edexcel
-
Arithmetic Relational And Logical Operations Edexcel
-
Determine Outputs Of An Algorithm Edexcel
-
Types Of Errors Edexcel
-
Standard Sorting Algorithms Edexcel
-
Standard Searching Algorithms Edexcel
-
Algorithm Efficiency Edexcel
-
Follow And Write Algorithms Edexcel
-
Truth Tables Edexcel3 主题
-
Binary Edexcel6 主题
-
Data Representation Edexcel4 主题
-
Data Storage And Compression Edexcel2 主题
-
Hardware Edexcel5 主题
-
Software Edexcel3 主题
-
Programming Languages Edexcel2 主题
-
Networks Edexcel7 主题
-
Network Security Edexcel2 主题
-
Environmental Issues Edexcel1 主题
-
Ethical And Legal Issues Edexcel3 主题
-
Cybersecurity Edexcel2 主题
-
Develop Code Edexcel6 主题
-
Constructs Edexcel4 主题
-
Data Types And Data Structures Edexcel5 主题
-
Operators Edexcel1 主题
-
Subprograms Edexcel2 主题
Data Structures And Sub Programs Edexcel
Exam code:1CP2
Data Structures
What is a data structure?
-
A data structure provides a structured way to store data, which makes it easy to access and manipulate
-
Examples of data structures are:
-
Arrays
-
Records
-
Arrays
-
An array is a sequence of data, of the same data type stored under the same identifier
-
Elements stored in an array can be identified by an index (position in the array)
-
Indexes start with the value 0
-
An array can be both 1-dimensional and 2-dimensional
Records
-
A record is a sequence of data, usually of mixed data types with a fixed length
-
Elements stored in an array can be identified by an index (position in the array)
-
Indexes start with the value 0
|
Structure |
Example |
|---|---|
|
Arrays |
|
|
Records |
|
-
scores[0]holds the value 1 -
scores[2]holds the value 2 -
students[3]holds the value “Birmingham“
Examiner Tips and Tricks
Python has it’s own data structure called a ‘list‘ which can look like both an array and record BUT they are not the same thing!
In the exam, if a list holds data of all the same type then it can be thought of as an array, if data is different types it can be thought of as a record
|
Python example |
|---|
|
# Create an array of numbers
# Access elements by index
# Print the entire array
# Modify an element
# Print the modified array
# Loop through the array
|
1-dimensional & 2-dimensional arrays
|
Python example |
|---|
|
# 1-dimensional array (list of numbers)
# Access elements by index
# Loop through the array
# 2-dimensional array
# Access elements by row and column index
# Print the entire 2D array
# Loop through the 2D array (accessing elements)
|
Responses