Python Dictionaries Quiz 1

Python Dictionaries Quiz 1

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

C# lesson10

C# lesson10

1st - 10th Grade

10 Qs

حاسب 2

حاسب 2

10th Grade

15 Qs

Adopt me

Adopt me

KG - Professional Development

14 Qs

ICT Java programming workshop

ICT Java programming workshop

9th Grade

10 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

ÔN TẬP CUỐI KỲ II TIN 8

ÔN TẬP CUỐI KỲ II TIN 8

8th - 11th Grade

17 Qs

C++. Классы

C++. Классы

11th Grade

12 Qs

limbajul pascal

limbajul pascal

10th Grade

12 Qs

Python Dictionaries Quiz 1

Python Dictionaries Quiz 1

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Daniel Gosch

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...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What does the code for an empty dictionary look like?

{ }

[ ]

( )

< >

2.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

What does a dictionary value with a key 'foo' and a value 42 look like?

{'foo': 42}

{key = foo: value = 42}

{foo, 42}

{42: 'foo'}

3.

MULTIPLE SELECT QUESTION

15 mins • 1 pt

>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}

Which of the two are keys in the myCat dictionary?

size

color

gray

loud

4.

MULTIPLE SELECT QUESTION

15 mins • 1 pt

>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}

Which of the two answers are values in the myCat dictionary?

size

color

gray

loud

5.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}

What will the following code return?

>>> myCat['size']

size

fat

gray

loud

6.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}

What will the following code return?

>>> myCat['color']

size

fat

gray

loud

7.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

>>> myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}

What will the following code return?

>>> myCat['age']

IndexError

KeyError

IndexValueError

12

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?