Correct code to define a list in Python?
Computer Science LISTS

Quiz
•
Computers
•
12th Grade
•
Hard
Steve Rich
Used 56+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
scores = [15, 29, 4, 50]
scores = {15, 29, 4, 50}
Int[] scores = {15, 29, 4, 50};
scores = (15, 29, 4, 50)
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Choose all the ways in which a Python list is different from an array ...
Arrays have fixed length: Lists have dynamic length
Arrays only contain one data type; Lists can contain many data types
Arrays are indexed from 1; Lists are indexed from 0
Arrays can not be empty; Lists can be empty
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output is ...?
mango
pear
kiwi
['apple','banana','pear']
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Choose three valid methods that may be applied to lists in Python ...
list.append(x)
list.count(x)
list.sort()
list.format()
list.isNumeric()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
colours = ['red', 'blue', 'yellow', 'green', 'purple']
Which instruction illustrates mutability?
colours[2] = 'pink'
colours.append('pink')
colours.insert(2, 'pink')
colours.remove('pink')
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output is ... ?
Index out of range
29
34
89
7.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Correct code to access the second 'Terry' in this list ... ?
montyPython[5]
montyPython[6]
montyPython[-1]
montyPython[3]
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
20 questions
Python Basics & Syntax

Quiz
•
10th - 12th Grade
13 questions
Python while loop

Quiz
•
8th Grade - University
15 questions
Python Quiz

Quiz
•
12th Grade
20 questions
Python variables and operators quiz

Quiz
•
9th - 12th Grade
15 questions
Understanding Lists in Python

Quiz
•
12th Grade
20 questions
Python while loops

Quiz
•
12th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
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
30 questions
Linear Inequalities

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

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