BTEC Level 3: Data Structures Interactive Quiz
1. What is the primary purpose of data structures in a computer program?
A. To create graphical user interfaces.
B. To compile and debug source code.
C. To organise and store data so it can be used efficiently.
D. To handle input and output operations only.
2. Which of the following is a key characteristic of a **List**?
A. It stores only unique, unordered elements.
B. It always has a fixed size defined at creation.
C. Items are stored in a specific, changeable order.
D. It can only store data of a single type (e.g., all integers).
3. A **Set** is a data structure distinguished by which feature?
A. It is always mutable (changeable).
B. It stores a collection of unique elements.
C. It groups related data with named fields.
D. It is indexed using two dimensions (rows and columns).
4. A programmer needs a data structure to store a collection of **unique tags** for a blog post. Which structure is the most appropriate?
A. Record
B. Multi-Dimensional Array
C. Set
D. List
5. A **Multi-Dimensional Array** is best suited to represent data that is structured like a:
A. Queue of items waiting to be processed.
B. Single line of data values.
C. Grid or a table (rows and columns).
D. Hierarchical tree structure.
6. In Python, which method is explicitly mentioned for adding an item to the **end** of a List?
A.
.insert()
B.
.add()
C.
.extend()
D.
.append()
7. Which Python List method is used to remove a **specific item** by its value?
A.
.pop()
B.
.remove()
C.
.delete()
D.
.clear()
8. Which data structure is used to group **related, heterogeneous data** together, often having named fields (like a single row in a spreadsheet)?
A. List
B. Set
C. Record (or Tuple)
D. Single-Dimensional Array
9. The file compares a List to which real-world item to help explain its ordered and changeable nature?
A. A phonebook
B. A shopping list
C. A calculator
D. A map
10. What is the result of attempting to add an element that already exists in a **Set**?
A. The element is added, but at the end.
B. A runtime error is immediately produced.
C. The original element is replaced by the new one.
D. The set remains unchanged.
11. In the context of data structures, what does the term **'immutable'** mean?
A. The data can only store strings.
B. The size can change dynamically.
C. It cannot be changed after it is created.
D. It can only be accessed sequentially.
12. A **Single-Dimensional Array** stores data in which format?
A. A series of key-value pairs.
B. A hierarchical format with branches.
C. A single sequence or line.
D. A nested structure of records.
13. In many languages (unlike Python Lists), which data structure is characterized by often having a **fixed size** defined when it is created?
A. Set
B. Record
C. Array
D. Tuple
14. A **Record** can best be thought of as a single:
A. Column in a database table.
B. Row in a spreadsheet.
C. Item within a list.
D. Section of a set.
15. How would you access the item 'orange' in the 2D array
data = [["red", "green"], ["yellow", "orange"]]
(assuming zero-indexing)?
A.
data[2][2]
B.
data[1][1]
C.
data[0][1]
D.
data[1][0]
16. The core purpose of **Records** (or Tuples) is to:
A. Ensure every element is unique.
B. Store elements in a way that allows quick searching.
C. Group related pieces of data together.
D. Automate repetitive tasks in a program.
17. Which data structure's characteristic is that the **order of the items does not matter**?
A. List
B. Array
C. Record
D. Set
18. A Python List is described as being able to hold:
A. Only integers and floating-point numbers.
B. Various items including numbers, words, and even other lists.
C. Only data of the same single type.
D. Only immutable objects.
19. The Python method used to add a new element to a **Set** is:
A.
.append()
B.
.insert()
C.
.add()
D.
.union()
20. What is the main benefit of using data structures in programming?
A. They replace the need for variables.
B. They help manage data effectively.
C. They speed up the computer's CPU clock speed.
D. They automatically write code loops.
Submit Quiz and See Results