7. Dictionaries - Data Structures

7. Dictionaries - Data Structures

6th - 8th Grade

15 Qs

quiz-placeholder

Similar activities

Grade 8

Grade 8

8th Grade

17 Qs

Ozaria Chapter 2 Quiz 1

Ozaria Chapter 2 Quiz 1

6th - 8th Grade

18 Qs

Grade 8

Grade 8

8th Grade

19 Qs

Cyberwellness Week - Upper Pri

Cyberwellness Week - Upper Pri

4th - 6th Grade

12 Qs

Revision G8

Revision G8

8th Grade

10 Qs

Python outputs

Python outputs

7th - 11th Grade

20 Qs

Scratch

Scratch

8th Grade

13 Qs

Learn to Code 1 Test

Learn to Code 1 Test

6th Grade

20 Qs

7. Dictionaries - Data Structures

7. Dictionaries - Data Structures

Assessment

Quiz

Computers

6th - 8th Grade

Medium

Created by

Robotic Schools

Used 25+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

How do you create an empty dictionary to store information about a student in Python?

student_info = []
student_info = {}
student_info = ()
student_info = set()

2.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Which method is used to get all course names (keys) in a dictionary storing course details?

dictionary.getKeys()
dictionary.allKeys()
dictionary.keys()
dictionary.retrieveKeys()

3.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What will be the output of the following code?

85

90

Bob

88

4.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Which method is used to add a new course with its grade to an existing student dictionary?

add()

insert()

append()

update()

5.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the following code?

{"Alice": 85, "Bob": 90, "Charlie": 88}

{"Alice": 85, "Charlie": 88}

{"Bob": 90, "Alice": 85, "Charlie": 88}

KeyError

6.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What will be the output of the following code?

{"name": "Alice", "age": 30, "department": "HR"}

{"name": "Alice", "age": 31, "department": "HR"}

KeyError

{"name": "Alice", "age": 30, "department": "HR", "age": 31}

7.

MULTIPLE CHOICE QUESTION

1 min • 10 pts

Media Image

What is the output of the following code?

{"Math": 95, "English": 88, "Science": 92, "History": 85, "Geography": 90}

{"Math": 95, "English": 88, "Science": 92, "History": 85}

{"Math": 95, "English": 88, "Science": 92}

Error

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?