Grade XI test

Grade XI test

5th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

list in python

list in python

10th - 12th Grade

15 Qs

Python quiz

Python quiz

10th Grade - Professional Development

10 Qs

7. Python (словари)

7. Python (словари)

5th - 9th Grade

15 Qs

list

list

12th Grade

20 Qs

PYTHON DICTIONARIES

PYTHON DICTIONARIES

11th Grade

14 Qs

Day 7 Practice on Dictionaries

Day 7 Practice on Dictionaries

12th Grade

14 Qs

Python Intermediate Quiz (Including pygame)

Python Intermediate Quiz (Including pygame)

3rd - 12th Grade

20 Qs

Dictionary in Python

Dictionary in Python

11th - 12th Grade

10 Qs

Grade XI test

Grade XI test

Assessment

Quiz

Computers, Other

5th - 12th Grade

Hard

Created by

Bhoomika Anand

Used 2+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Media Image

Which of the following code deletes the key 103 and its value

del grades[103]

grades.pop(103)

del grades["103"]

grades.pop("103")

Media Image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How to fix the syntax error above ?

grades.pop("Science", None)

grades.pop["Science","None"]

del grades["Math"]

del grades["Math", None]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method will remove an element the Dictionary data type?

.pop()

.discard()

.remove()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Please select all correct ways to empty the following dictionary

student = {

"name": "Emma",

"class": 9,

"marks": 75

}

del student

del student[0:2]

student.clear()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would be the output of the following code snippet?


a_dict = {'color': 'blue', 'fruit': 'apple', 'pet': 'dog'}

d_items = a_dict.items()

print(d_items)

('color', 'blue'), ('fruit', 'apple'), ('pet', 'dog')

dict_items([('color'), ('fruit'), ('pet')])

[('color', 'blue'), ('fruit', 'apple'), ('pet', 'dog')]

dict_items([('color', 'blue'), ('fruit', 'apple'), ('pet', 'dog')])

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

The code above prints

Math

Physics

Chemistry

English

4

3.8

3.6

3.7

None

None

None

None

NaN

NaN

NaN

NaN

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the program above

e

y

t

g

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?