Python 2D Lists Flashcard
Flashcard
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

16 questions
Show all answers
1.
FLASHCARD QUESTION
Front
How do you access the element in the second row and third column of a 2D list `matrix`? Options: `matrix[1][2]`, `matrix[2][3]`, `matrix[2][1]`, `matrix[3][2]`
Back
`matrix[1][2]`
2.
FLASHCARD QUESTION
Front
How can you modify the value of the first element in the first row of a 2D list `matrix` to 5? Options: `matrix[0][0] = 5`, `matrix[1][1] = 5`, `matrix[0] = 5`, `matrix = 5`
Back
`matrix[0][0] = 5`
3.
FLASHCARD QUESTION
Front
What will be the output of the following code snippet if `matrix = [[1, 2], [3, 4]]`?
```python
print(matrix[1][1])
```
Back
`4`
4.
FLASHCARD QUESTION
Front
Which of the following is a valid 2D list in Python? Options: `[[1, 2, 3], [4, 5], [6]]`, `[[1, 2], 3, [4, 5]]`, `[[1], [2, 3], 4]`, `[[1] [2] [3]]`
Back
`[[1, 2, 3], [4, 5], [6]]`
5.
FLASHCARD QUESTION
Front
How can you add a new row `[5, 6, 7]` to an existing 2D list `matrix`? Options: `matrix.append(5, 6, 7)`, `matrix.append([5, 6, 7])`, `matrix += [5, 6, 7]`, `matrix.insert(len(matrix), [5, 6, 7])`
Back
`matrix.append([5, 6, 7])`
6.
FLASHCARD QUESTION
Front
What error is raised when trying to access an element in a 2D list with an index that is out of range?
Back
IndexError
7.
FLASHCARD QUESTION
Front
How do you remove the last row from a 2D list `matrix`? Options: matrix[-1].delete(), `matrix.pop()`, `matrix.remove(-1)`, Both A) and B) are correct
Back
`matrix.pop()`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Disney Trivia
Flashcard
•
KG - 12th Grade
10 questions
“Python бағдарламалау тіліндегі циклдық операторлар”
Flashcard
•
9th Grade
12 questions
Vocabulary Flashcards
Flashcard
•
KG
12 questions
Trennbare Verben
Flashcard
•
KG
13 questions
Linear Equations
Flashcard
•
10th Grade
15 questions
15 Câu hỏi trắc nghiệm về di sản văn hóa Chăm
Flashcard
•
10th Grade
8 questions
MATHEMATICS 10 - Graph of Polynomial Functions PART 1
Flashcard
•
10th Grade
16 questions
Wonder why
Flashcard
•
KG
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade