Which of these is the correct way to declare a list (array) in Python?
Hint: look carefully at the type of brackets used.
Python Arrays
Quiz
•
Computers
•
9th - 10th Grade
•
Medium
O Hawkridge
Used 12+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is the correct way to declare a list (array) in Python?
Hint: look carefully at the type of brackets used.
fruit = ["apples", "oranges", "bananas"]
fruit = "apples", "oranges", "bananas"
fruit = {"apples", "oranges", "bananas"}
fruit = ("apples", "oranges", "bananas")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Each item in a list has an "address" or index. What is the first index in a Python list?
1
0
a
A
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the position of the name 'Paula' in the following list:
names = ["Paul","Phillip","Paula","Phillipa"]
0
1
2
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In programming, lists are often known as...
Arrays
Elements
Indexes
Data
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
List items have an index number. In the following list, which item has the index number 3?
["John", "Harry", "Jesse", "John", "Harry", "Harry"]
"John"
"Harry"
"Jesse"
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which code would I use to add an item to a list?
variable.add()
variable.append()
append.variable()
add.variable()
10 questions
Python - List
Quiz
•
9th - 12th Grade
10 questions
Одновимірні масиви.
Quiz
•
10th Grade
10 questions
Python Basics - A level
Quiz
•
10th - 12th Grade
13 questions
Python List Operations
Quiz
•
10th Grade
10 questions
ข้อสอบไพทอน
Quiz
•
9th Grade
15 questions
Python Lists
Quiz
•
8th - 12th Grade
12 questions
Code.org Unit 6 - Lists
Quiz
•
9th - 12th Grade
12 questions
For Loops in Python
Quiz
•
9th - 10th Grade
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
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