11/29: Dictionary Review

11/29: Dictionary Review

12th Grade

10 Qs

quiz-placeholder

Similar activities

Data Security Worksheet

Data Security Worksheet

10th Grade - University

15 Qs

LA5.C5: Branching and Subroutines

LA5.C5: Branching and Subroutines

9th Grade - University

14 Qs

Identifying devices

Identifying devices

12th Grade

11 Qs

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

11th - 12th Grade

10 Qs

2025 python class first quiz

2025 python class first quiz

9th Grade - University

10 Qs

Stepwise Refinement

Stepwise Refinement

11th - 12th Grade

13 Qs

Python List

Python List

4th Grade - University

15 Qs

1.1.1 The structure and function of the processor

1.1.1 The structure and function of the processor

11th Grade - University

15 Qs

11/29: Dictionary Review

11/29: Dictionary Review

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

GWC Lowell

Used 1+ 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

1 min • 1 pt

Which of these dictionaries has integers as the keys and strings as the values?

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the value of supplies after this code is run?

{"pencil": 12,

"paper": 70, "notebooks": 10, "eraser": 20, "highlighters": 25}

{"pencil": 12,

"paper": 70, "notebooks": 10, "eraser": 20}

{"pencil": 12,

"paper": 30, "notebooks": 10, "eraser": 20,

"paper": 40, "highlighters": 25}

{"pencil": 12,

"paper": 40, "notebooks": 10, "eraser": 20, "highlighters": 25}

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the line of code to initialize an empty dictionary called thesaurus?

thesaurus = new Dictionary()

thesaurus = empty_dict()

thesaurus = {}

thesaurus = []

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following code output?

["veggie burger", "salad", "soda"]

KeyError

"fries"

["hot dog", "apple slices", "orange juice"]

Answer explanation

There is no key:value pair in this dictionary with a key of 3, so this code will produce an error.

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does the following code output?

True

False

KeyError

10

Answer explanation

This code checks for the existence of "notebooks" as a key in the dictionary. Since it exists as a key, it will print True.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of the following code?

Media Image
Media Image
Media Image
Media Image

Answer explanation

This loop goes through each key in the dictionary and prints it.

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will the following code output?

True

KeyError

0

False

Answer explanation

This code checks for the existence of "pen" as a key in the dictionary. "pen" is not a key.

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?