9th Grade - 05 March 2025

9th Grade - 05 March 2025

9th Grade

57 Qs

quiz-placeholder

Similar activities

Search Skills

Search Skills

8th - 12th Grade

57 Qs

UNIT 5 TEST Boolean Search, Fake News, Current Events.

UNIT 5 TEST Boolean Search, Fake News, Current Events.

5th - 9th Grade

55 Qs

IBA Lesson 3: Introduction to Internet Technology Vocabulary

IBA Lesson 3: Introduction to Internet Technology Vocabulary

9th - 12th Grade

53 Qs

Scratch Programming

Scratch Programming

9th Grade - University

53 Qs

Exploring Computer Science Unit 1 Review

Exploring Computer Science Unit 1 Review

9th - 12th Grade

55 Qs

Exploring Computer Science Final Exam

Exploring Computer Science Final Exam

9th - 12th Grade

52 Qs

array review

array review

9th - 12th Grade

60 Qs

REVIEW (LESSON 1 - 3)

REVIEW (LESSON 1 - 3)

9th Grade

60 Qs

9th Grade - 05 March 2025

9th Grade - 05 March 2025

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Eugene Castro

Used 2+ times

FREE Resource

57 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following correctly accesses the value of key "name" in the dictionary mydict?
mydict("name")
mydict["name"]
mydict.get("name")
mydict.name

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If you have a dictionary person = {"name": "Alice", "age": 25}, what does person.get("age") return?
It returns 25
It returns an empty string
It returns None
It returns a list of keys

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Given car = {"brand": "Ford", "model": "Mustang", "year": 1964}, how do you access the "year" using a safer approach without an error if absent?
car["year"]
car("year")
car.get("year")
car["year"].value

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method returns all the values in a dictionary?
keys()
values()
items()
getvalues()

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In Python, which method returns a list containing the key-value pairs of a dictionary?
pairs()
lists()
items()
keyvalue()

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you change the value of "year" to 2021 in the dictionary car = {"brand": "Ford", "model": "Mustang", "year": 1964}?
car["year"] = 2021
car("year") = 2021
car.update["year"] = 2021
car = {"year": 2021}

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which dictionary method can be used to change multiple items at once?
renew()
update()
modify()
change()

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?