9th Grade - 05 March 2025

9th Grade - 05 March 2025

9th Grade

57 Qs

quiz-placeholder

Similar activities

Python Year 7 Assessment

Python Year 7 Assessment

7th - 9th Grade

55 Qs

Week 11: Lists, Loops & "Failure"!

Week 11: Lists, Loops & "Failure"!

9th - 12th Grade

58 Qs

Python Review - PLTW CSE / Codecademy

Python Review - PLTW CSE / Codecademy

9th - 12th Grade

53 Qs

Week 12 - Even More Lists

Week 12 - Even More Lists

9th - 12th Grade

58 Qs

CSP Python Test

CSP Python Test

9th - 12th Grade

52 Qs

Computer Science Concepts and Terminology

Computer Science Concepts and Terminology

9th - 12th Grade

54 Qs

Year 8 End of Year Assessment

Year 8 End of Year Assessment

7th - 9th Grade

60 Qs

Web Applications Quiz

Web Applications Quiz

9th Grade

58 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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?