Dictionary in Python

Dictionary in Python

11th Grade

17 Qs

quiz-placeholder

Similar activities

computer science

computer science

11th Grade

13 Qs

Python Basics & Syntax

Python Basics & Syntax

10th - 12th Grade

20 Qs

Iteration

Iteration

11th Grade

20 Qs

Review Python Dictionaries

Review Python Dictionaries

9th - 12th Grade

18 Qs

Basic Python Coding

Basic Python Coding

11th - 12th Grade

15 Qs

Python: списки, кортеж, словник, множина

Python: списки, кортеж, словник, множина

9th - 12th Grade

14 Qs

Python Basics - yr 9

Python Basics - yr 9

9th - 12th Grade

18 Qs

COMPUTER DICTIONARY

COMPUTER DICTIONARY

11th Grade

22 Qs

Dictionary in Python

Dictionary in Python

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Lalita joshi

Used 28+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code

dict1 = {"key1":1, "key2":2}

dict2 = {"key2":2, "key1":1}

print(dict1 == dict2)

True

False

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Select correct ways to create an empty dictionary

sampleDict = {}

sampleDict = dict()

sampleDict = dict{}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Please select all correct ways to empty the following dictionary

student = {

"name": "Emma",

"class": 9,

"marks": 75

}

del student

del student[0:2]

student.clear()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Items are accessed by their position in a dictionary

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dictionary keys must be immutable

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, Dictionaries are immutable

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

________________method removes all items from the particular dictionary.

clear( )

pop( )

del ( )

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?