Python Arrays Quiz P7

Quiz
•
Computers
•
11th Grade
•
Medium
Standards-aligned
Grit and Motivation
Used 17+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax to create an array in Python using the array module?
`array('i', [1, 2, 3])`
`array([1, 2, 3])`
`[1, 2, 3]`
`{'i': [1, 2, 3]}`
Tags
DOK Level 1: Recall
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the first element of a Python array named `arr`?
`arr[0]`
`arr[1]`
`arr(first)`
`first(arr)`
Tags
DOK Level 1: Recall
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to modify the second element in a Python array `arr` to the value 5?
`arr[1] = 5`
`arr(1) = 5`
`arr[2] = 5`
`modify(arr[1], 5)`
Tags
DOK Level 1: Recall
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you slice a Python array `arr` to get the first three elements?
`arr[0:2]`
`arr[0:3]`
`arr[:3]`
`arr[1:3]`
Tags
DOK Level 1: Recall
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which array method in Python is used to add an element at the end of an array?
`append()`
`extend()`
`insert()`
`add()`
Tags
DOK Level 1: Recall
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the last element of a Python array named `arr`?
`arr[-1]`
`arr[last]`
`arr[end]`
`last(arr)`
Tags
DOK Level 1: Recall
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to change the third element in a Python array `arr` to the string "Python"?
`arr[2] = "Python"`
`arr[3] = "Python"`
`arr[2] = Python`
`set(arr[2], "Python")`
Tags
DOK Level 1: Recall
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
APCS A - Array 6.1,6.2,6.3,6.

Quiz
•
9th - 12th Grade
17 questions
Arrays recap

Quiz
•
9th Grade - University
10 questions
AP CSP - Python Lists and Arrays

Quiz
•
9th - 12th Grade
10 questions
Белгіленген сипаттары бар элементті іздеу

Quiz
•
9th - 12th Grade
20 questions
Programming Fundamentals Part 2

Quiz
•
9th - 11th Grade
20 questions
Pretest C++

Quiz
•
11th Grade
20 questions
Arrays in Java

Quiz
•
9th - 12th Grade
20 questions
Season 5 #Spaic Python Weekly Quiz

Quiz
•
KG - Professional Dev...
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University