Back to marketplace

Chapter 33 - Arrays, tuples and records

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What is an elementary data type?

Back (Answer)

» Integer » Real » Boolean » Char » String

#2
Front (Question)

What are some examples of built-in structured data types such as string, array and record?

Back (Answer)

» String » Array » Record

#3
Front (Question)

What is an array?

Back (Answer)

» Data structure which contains a set of data of items of the same data type » Static data structure - size cannot be changed » Stored contiguously in memory

#4
Front (Question)

What does it mean by finite?

Back (Answer)

» There is a specific number of elements in the array

#5
Front (Question)

What does it mean by ordered?

Back (Answer)

» Implies that there is a first second, third elements of the array

#6
Front (Question)

What position do arrays always start at?

Back (Answer)

» Position 0

#7
Front (Question)

What is an Index?

Back (Answer)

» A reference that is helpful to reference each element in the array, such as array[0]

#8
Front (Question)

How can a 2-D array be visualised as?

Back (Answer)

» Visualised as a table

#9
Front (Question)

How can you refer the elements in the 2-D array?

Back (Answer)

» By their row number then column number » Such as array[rownumber, columnnumber]

#10
Front (Question)

What position in the array is it when the user ask to input row number 1?

Back (Answer)

» Prints the 0th row, as the array starts at 0

#11
Front (Question)

How can you make a 2-D array in python?

Back (Answer)

» Array = [[100,200,300],[500,400,200]]

#12
Front (Question)

What is an important rule when making 2-D arrays in python?

Back (Answer)

» Must always be separated by a comma

#13
Front (Question)

What is the first element in a 3-D array?

Back (Answer)

» [0,0,0]

#14
Front (Question)

What is a Tuple?

Back (Answer)

» An ordered set of values » Which could be elements of any type » Which are immutable

#15
Front (Question)

How are Tuples different from arrays?

Back (Answer)

» Unlike arrays, the elements do not all have to be of the same type

#16
Front (Question)

What does it mean if a Tuple is immutable?

Back (Answer)

» Its elements cannot be changed » They are a fixed size set at the point of creation

#17
Front (Question)

What does a file consist of?

Back (Answer)

» A number of records

#18
Front (Question)

What does a record contain a number of?

Back (Answer)

» Number of fields holding one item of data

#19
Front (Question)

What is a record?

Back (Answer)

» Unordered data structure consisting of different data types » Collection of related fields

#20
Front (Question)

How can we create an array?

Back (Answer)

» By allocating a contiguous part of memory for the purpose of storing that data

#21
Front (Question)

What is the definition of contiguous?

Back (Answer)

» Means all the data is stored together

#22
Front (Question)

How are lists different to array in terms of how items are stored?

Back (Answer)

» Lists are not contiguous

#23
Front (Question)

What does it mean if a list is heterogeneous?

Back (Answer)

» Can support more than one data type

#24
Front (Question)

What does it mean if an array is homegeneous?

Back (Answer)

» Can only support a single data type