Search Header Logo

Python Dictionaries Reivew

Authored by Cedra Wilson

Computers

9th - 12th Grade

Used 94+ times

Python Dictionaries Reivew
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The following program stores the extra credit points for Mr. Villa’s students in extra_credit. Which line of code will print the name of the student who has the lowest point value?

extra_credit = {150:'Nathaniel', 50:'Sandie', 95:'Robert', 90:'Travis', 200:'LaKeisha'}

print(extra_credit(50))

print(extra_credit[95])

print(extra_credit[50])

print(extra_credit[Nathaniel])

print(extra_credit[Sandie])

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The following program stores the extra credit points for Mr. Villa’s students in extra_credit. Which line of code will print the name of the student who has the highest point value?

extra_credit = {150:'Nathaniel', 50:'Sandie', 95:'Robert', 90:'Travis', 100:'LaKeisha'}

print(extra_credit(50))

print(extra_credit[150])

print(extra_credit[50])

print(extra_credit[Nathaniel])

print(extra_credit[Sandie])

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will print onto the screen with the following program runs?

extra_credit = {'Sandie': 50, 'Travis': 90, 'LaKeisha': 150}

print(extra_credit['LaKeisha'])

LaKeisha

90

150

Travis

50

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will print onto the screen with the following program runs?

extra_credit = {'Sandie': 50, 'Travis': 90, 'LaKeisha': 150}

print(extra_credit['Travis'])

LaKeisha

90

150

Travis

50

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose you have the following dictionary, which stores the names and ages of people:

my_dictionary = { "Bo": 32, "Fiona": 28, "Carlos": 45 }

Which line correctly prints Bo’s age?

print(my_dictionary[0])

print(my_dictionary[0][1])

print(my_dictionary["Bo"])

print(my_dictionary["Bo"][1])

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose you have the following dictionary, which stores the names and ages of people:

my_dictionary = { "Bo": 32, "Fiona": 28, "Carlos": 45 }

Which line correctly prints Fiona’s age?

print(my_dictionary[1])

print(my_dictionary[0][1])

print(my_dictionary["Bo"])

print(my_dictionary["Fiona"])

Access all questions and much more by creating a free account

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

Already have an account?