Dictionary1

Dictionary1

11th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Dictionaries

Dictionaries

11th Grade

15 Qs

Python Dictionaries

Python Dictionaries

11th Grade

15 Qs

DICTIONARY

DICTIONARY

11th Grade

8 Qs

DIctionary

DIctionary

11th Grade

11 Qs

Grade XI test

Grade XI test

5th - 12th Grade

15 Qs

Python Dictionary

Python Dictionary

11th Grade

14 Qs

Dictionary in Python

Dictionary in Python

11th - 12th Grade

10 Qs

Python quiz

Python quiz

10th Grade - Professional Development

10 Qs

Dictionary1

Dictionary1

Assessment

Quiz

Computers

11th - 12th Grade

Medium

Created by

sabna sathar

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Items are accessed by their position in a dictionary

True

False

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following create an empty dictionary (D)?

D = dict()

D = ()

D = []

D = {}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

is this code correct?
quiz = ("Do you help out at home? ":"yes"      }
No
Yes
Both

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, Dictionaries are immutable

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid way to define this dictionary in Python:

d = dict([

('foo', 100),

('bar', 200),

('baz', 300)

])

d = {}

d['foo'] = 100

d['bar'] = 200

d['baz'] = 300

d = dict(foo=100, bar=200, baz=300)

d = {'foo': 100, 'bar': 200, 'baz': 300}

d = { ('foo', 100), ('bar', 200), ('baz', 300) }

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about dictionary keys in Python is false?

Keys must be immutable

Keys can be of any data type

Keys can be duplicated

Keys are case-sensitive

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is used to create an empty set?

{ }

set()

[ ]

( )

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?