Dictionaries

Dictionaries

11th Grade

10 Qs

quiz-placeholder

Similar activities

Python Tuples Review

Python Tuples Review

11th Grade

15 Qs

Python-list,tuple,Dictionary

Python-list,tuple,Dictionary

11th - 12th Grade

7 Qs

Dictionary Class 11

Dictionary Class 11

11th - 12th Grade

12 Qs

TUPLES

TUPLES

11th Grade

8 Qs

Dictionary

Dictionary

11th Grade

6 Qs

PYTHON DICTIONARIES

PYTHON DICTIONARIES

11th Grade

14 Qs

Intermediate python

Intermediate python

9th - 12th Grade

9 Qs

Python Fundamentals -2

Python Fundamentals -2

11th - 12th Grade

10 Qs

Dictionaries

Dictionaries

Assessment

Quiz

Computers

11th Grade

Easy

Created by

Reshma Surendran

Used 7+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dictionaries are set of elements.

Ordered

Unordered

Sorted

Random

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Dictionaries are _____ data types of Python.

Mutable

Simple

Immutable

All of these

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will raise an error if the given key is not found in the dictionary ?

del statement

pop()

getitem()

all of these

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following is correct with respect to above Python code?

d = {"a":3,"b":7}

(a) a dictionary d is created.

(b) a and b are the keys of dictionary d.

(c) 3 and 7 are the values of dictionary d.

(d) All of these.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would the following code print?

d = {'spring': 'autum', "autumn": "fall", "fall":"spring"}

print (d["autumn"])

(a) autumn

(b) fall

(c) spring

(d) Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed by the following statements?

  1. D1 = {"cat":17, "dog":6, "elephant":23, "bear":20}

    print ("dog" in D1)

  1. (a) True

  1. (b) False

  1. (c) Error

  1. (d) None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following will delete key_value pair for key = "tiger" in dictionary?

    di = {"loin" : "wild", "tiger" : "wild", "cat": "domestic" : "dog" : "domestic"}

  1. (a) del di["tiger"]

  1. (b) di[“tiger”].delete()

  1. (c) delete(di.["tiger"])

  1. (d) del(di.["tiger])

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?