
1D and 2D Arrays in Python

Quiz
•
Computers
•
10th Grade
•
Medium

Kiah Warner
Used 5+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a 1D array in Python?
arr = [1, 2, 3, 4, 5]
arr = (1, 2, 3, 4, 5)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the third element in a 1D array named 'arr' in Python?
arr.get(3)
arr(2)
arr[3]
arr[2]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you modify the second element in a 1D array named 'arr' to have a value of 5 in Python?
arr.insert(1, 5)
arr.pop(1, 5)
arr[2] = 5
arr[1] = 5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a 2D array in Python?
A 2D array in Python is a single list with nested elements.
A 2D array in Python is a list of lists.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the element in the second row and third column of a 2D array named 'matrix' in Python?
matrix[1][2]
matrix(1, 2)
matrix[2][3]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you change the value of the element in the first row and second column of a 2D array named 'matrix' to 10 in Python?
matrix[0][1] = 10
matrix[0,1] = 10
matrix[0][2] = 10
matrix[1][0] = 10
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the process of traversing a 2D array called in Python?
Nested loop iteration
Array sorting
Array concatenation
Array filtering
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Javascript

Quiz
•
10th - 12th Grade
10 questions
AutoCad Practice Exam

Quiz
•
10th - 11th Grade
13 questions
A words - GCSE Computer Science

Quiz
•
1st - 10th Grade
13 questions
AL-Two-Dimensional Array

Quiz
•
9th - 12th Grade
8 questions
برمامج بنسل

Quiz
•
10th Grade
10 questions
Programming - Arrays

Quiz
•
2nd - 12th Grade
14 questions
Pseudocode Quiz

Quiz
•
10th Grade
16 questions
CompTIA Network+ N10-008 Standards

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade