Dictionaries

Dictionaries

11th Grade

10 Qs

quiz-placeholder

Similar activities

Hệ Điều Hành Của Máy Tính

Hệ Điều Hành Của Máy Tính

10th Grade - University

10 Qs

3rd week g9 summative

3rd week g9 summative

7th - 12th Grade

15 Qs

Computer Basics 2 - CESA

Computer Basics 2 - CESA

7th Grade - University

10 Qs

Quiz #2 ETEC 486 | Spr. 16

Quiz #2 ETEC 486 | Spr. 16

KG - University

10 Qs

HARD DISK DRIVE

HARD DISK DRIVE

11th - 12th Grade

10 Qs

Chapter 8 Week 1

Chapter 8 Week 1

9th - 12th Grade

11 Qs

Debugging Challenge 2

Debugging Challenge 2

7th - 12th Grade

15 Qs

TRẮC NGHIỆM TIN 12 KỲ II

TRẮC NGHIỆM TIN 12 KỲ II

10th - 12th Grade

10 Qs

Dictionaries

Dictionaries

Assessment

Quiz

Computers

11th Grade

Practice Problem

Easy

Created by

Reshma Surendran

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

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])

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?