Chapter 9 Tuples, Lists, & Dictionaries

Chapter 9 Tuples, Lists, & Dictionaries

10 Qs

quiz-placeholder

Similar activities

Unit 3 Lesson 5 Review

Unit 3 Lesson 5 Review

7th Grade

15 Qs

Business Idea Brainstorming Quiz

Business Idea Brainstorming Quiz

12th Grade

15 Qs

Text Structure Quiz

Text Structure Quiz

KG - University

14 Qs

Language and Literacy Development Practice Quiz: Objective 0005

Language and Literacy Development Practice Quiz: Objective 0005

KG - University

7 Qs

Python Quiz on For Loops

Python Quiz on For Loops

8th Grade

10 Qs

3.1 Out of My Mind

3.1 Out of My Mind

4th Grade

10 Qs

Spring_Choo_Nevelson_Review

Spring_Choo_Nevelson_Review

KG - University

7 Qs

WTMMTM Ch. 37-42 Quiz

WTMMTM Ch. 37-42 Quiz

5th Grade

11 Qs

Chapter 9 Tuples, Lists, & Dictionaries

Chapter 9 Tuples, Lists, & Dictionaries

Assessment

Quiz

others

Medium

Created by

Dottie Holland

Used 7+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?