Edexcel IGCSE Computer Science 4CP0
Algorithms
Searching and Sorting Algorithms
Decomposition and Abstraction
Developing and Testing Code
Programming Constructs and Operators
Data Types and Data Structures
Input, Output and Validation
Data Representation
Data Storage and Compression
Encryption
Hardware and the CPU
Software
Programming Languages and Translators
Networks
Network Security
The Internet and the World Wide Web
Emerging Trends, Issues and Impact
Data Types and Data Structures
Arrays and records
- 3 things to know
- Papers 1 and 2
Overview
One-dimensional and two-dimensional arrays with zero-based indices, records, and how each is used and processed.
What you need to know
Answer each one before you reveal it.
How can a record be stored in Python?
What index does the first element of an array have?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a one-dimensional array?
Model answer
A one-dimensional array is a data structure that holds a list of values of the same type under one name, each with an index.
- 2
What index does the first element of an array have?
Model answer
The first element has index 0, because indices start at zero.
- 3
Why are arrays used instead of separate variables?
Model answer
One array can hold hundreds of values under a single name. A loop can then process every value with very little code.
- 4
An array names holds ['Ann', 'Ben', 'Cal']. What is names[2]?
Model answer
The element names[2] is 'Cal', because the indices are 0, 1 and 2.
- 5
What is a two-dimensional array?
Model answer
A two-dimensional array stores values in rows and columns, like a table. Each element is found by a row index and a column index.
- 6
Give an example of data suited to a two-dimensional array.
Model answer
The marks of 30 students in 5 tests suit a two-dimensional array. Each row is a student and each column a test.
Other ways to work this
The same content, four other ways.
Everything in your subscription
Runs, plus a mode for every other kind of session.
Every question in Data Types and Data Structures, on a schedule.
Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.