Dictionary in Python

Dictionary in Python

8th Grade

10 Qs

quiz-placeholder

Similar activities

Nested if...else statements

Nested if...else statements

6th - 8th Grade

8 Qs

Python-Code Right or Wrong

Python-Code Right or Wrong

7th - 8th Grade

10 Qs

5.4 Excel Quizizz

5.4 Excel Quizizz

8th - 12th Grade

15 Qs

Python 2 модуль

Python 2 модуль

6th - 8th Grade

10 Qs

Hangman Game - Programming Questions

Hangman Game - Programming Questions

7th - 11th Grade

15 Qs

Python_Dictionary_quiz1

Python_Dictionary_quiz1

5th - 12th Grade

10 Qs

Slice Python Quiz

Slice Python Quiz

6th - 8th Grade

10 Qs

Computer Systems - How the web works - Lesson 7

Computer Systems - How the web works - Lesson 7

8th Grade

12 Qs

Dictionary in Python

Dictionary in Python

Assessment

Quiz

Computers

8th Grade

Medium

Created by

Amna Sajjad

Used 8+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A dictionary is 'like' a list.

True

False

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

In a dictionary, each key maps to a _____________.

3.

MULTIPLE SELECT QUESTION

1 min • 1 pt

How would you create an empty Dictionary? Select all that apply.

a=dict()

a={}

a=dict[]

a=dict

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Curly braces {} represent a list, the same way square brackets [] represent a dictionary.

True

False

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

When you print a dictionary, the order of the key-value pairs may not be the same!

True

False

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would the len() function print in the following code?

a_dictionary={"a":1,"b":1,"c":1,"d":1,"e":5}

print(len(a_dictionary))

5

10

Error

None of these

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What method in dictionaries takes a key and a default value?

find()

get()

search()

lookup()

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?