Dictionary1

Dictionary1

11th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Unit 5: Lists and Dictionaries

Unit 5: Lists and Dictionaries

9th - 12th Grade

10 Qs

Cechy relacyjnej bazy danych

Cechy relacyjnej bazy danych

9th - 12th Grade

9 Qs

2) Python Variables

2) Python Variables

8th - 11th Grade

15 Qs

quiz

quiz

11th Grade

14 Qs

Intermediate python

Intermediate python

9th - 12th Grade

9 Qs

Python Fundamentals -2

Python Fundamentals -2

11th - 12th Grade

10 Qs

CodeHS 5.4 & 5.5 ArrayList Stuff

CodeHS 5.4 & 5.5 ArrayList Stuff

9th - 12th Grade

10 Qs

Linux: Core Concepts

Linux: Core Concepts

9th Grade - University

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?