Chapter 9 Tuples, Lists, & Dictionaries

Chapter 9 Tuples, Lists, & Dictionaries

10 Qs

quiz-placeholder

Similar activities

Johns Infection Protection Questions

Johns Infection Protection Questions

KG - University

14 Qs

Greek and Latin Roots - Unit 7

Greek and Latin Roots - Unit 7

KG - University

10 Qs

Geography and Map Skills Review

Geography and Map Skills Review

KG - University

10 Qs

Finding Credible Sources and Supporting Opinions

Finding Credible Sources and Supporting Opinions

KG - University

10 Qs

Art 1 Semester Test '25

Art 1 Semester Test '25

KG - University

15 Qs

Photosynthesis Quiz LE 2025

Photosynthesis Quiz LE 2025

KG - University

15 Qs

Light Task Cards 1-10

Light Task Cards 1-10

KG - University

11 Qs

Chapter 9 Tuples, Lists, & Dictionaries

Chapter 9 Tuples, Lists, & Dictionaries

Assessment

Quiz

others

Practice Problem

Medium

Created by

Dottie Holland

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

colors = ["red", "green", "burnt sienna", "blue"] colors[2] What is the output of the colors[2] expression?

It causes a run-time error.
'blue'
'red'
'green'
'burnt sienna'

2.

FILL IN THE BLANK QUESTION

30 sec • 10 pts

colors = ["red", "green", "burnt sienna", "blue"] Select the value 'red' from the above list?

3.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

colors = ["red", "green", "burnt sienna", "blue"] "yellow" in colors What is the result of the yellow in colors expression?

3
4
ValueError: 'yellow' is not in list
False

4.

FILL IN THE BLANK QUESTION

30 sec • 10 pts

Consider the following nested list definition:

x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']

What is the expression that returns the 'z' in 'baz'?

5.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

What’s the main difference between Python lists and tuples?

Lists are faster and tuples are slower.
Lists are mutable and tuples are immutable.
Lists can hold any data type and tuples can only contain int and str objects.
Lists are immutable and tuples are mutable.

6.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

How do you assign a tuple of length 1 to the variable a?

a = [1]
a = 1
a = tuple(1)
a = (1,)

7.

MULTIPLE SELECT QUESTION

30 sec • 10 pts

Which of the following are true of Python dictionaries:

Dictionaries are accessed by key.
Dictionaries can be nested to any depth.
Dictionaries are mutable.
Items are accessed by their position in a dictionary.
All the keys in a dictionary must be of the same type.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?