WorksheetsCPM9.1-9.3 Quiz Review
Total questions: 15
Worksheet time: 9mins
In two-dimensional lists, the _____________ is always listed first.
dimension
row
initializer list
column
In Python arrays are also called ______.
elements
rows
lists
string
What is in element [0][0]?
pretzel
undervalue
rational
windmill
What is in element [3][1]?
honey
iron
rational
effort
Two-dimensional lists are used to store data that can be represented in a _____________.
number
string
grid
row
Consider the following code:
grid = []
grid.append (["frog", "cat", "hedgehog"])
grid.append (["fish", "emu", "rooster"])
print (grid[0][1])
What is output?
frog
cat
hedgehog
fish
It is not possible for an array to hold an array.
True
False
Consider the following code:
grid = []
grid.append (["frog", "cat", "hedgehog"])
grid.append (["fish", "emu", "rooster"])
print (grid)
How many rows does this array have?
1
2
3
4
To iterate through (access all the entries of) a two-dimensional arrays you need (a) for loops. (Enter the number of for loops needed).
An individual piece of data stored in a list is called a(n) (a) .
Why do we use two for loops with two-dimensional arrays?
One to move over the rows, and one for the columns.
To correctly print out the contents.
Because they can store both numbers and words.
To do number calculations.
A two-dimensional list is
a looped data structure
a boolean
a list of lists
a primitive data type
Consider the code. How many columns does the list have?
1
2
3
4
Consider the code. What are the dimensions of the two-dimensional list?
5x7
4x2
7x5
1x7
In two-dimensional lists the _____________ is always listed second.
dimension
row
initializer list
column
