Expand To Get Answers
Quiz 7 - Dictionaries » Week 4 » Introduction To Python Programming » Re⥃askly
Quiz 7 – Dictionaries
Graded Quiz • 30 min Quiz07 Questions Week 4
Re⥃askly Logo

Quiz 7 – Dictionaries

Graded Quiz • 30 min Quiz07 Questions Week 4
Practice More Quizzes:
Quiz
Quiz
09 Questions Week 2
Quiz
5 Questions Week 2
Quiz
5 Questions Week 3
Quiz
05 Questions Week 3
Quiz
07 Questions Week 4
Quiz
6 Questions Week 4

Q:

What’s the result of the following code? my_list = [‘cat’, ‘dog’, ‘fish’] print(‘cat’ in my_list)

Q:

What will list(d.keys()) return? d = {‘A’: 1, ‘B’: 2, ‘C’: 3}

Q:

How would one delete the entry with key ‘A’? d = {‘A’: 1, ‘B’: 2, ‘C’: 3}

Q:

What is the result of the following code? d = {} d[1] = 1 d[‘1’] = 2 d[1] = 3 sum = 0 for i in d: sum += d[i] print(sum)

Q:

What is the result of the following code? course = {‘1’: ‘CIT590’, ‘2’: ‘CIT591’, ‘3’: ‘CIT593’} print(course[‘1’])

Q:

What is the result of the following code? course = {‘1’: ‘CIT590’, ‘2’: ‘CIT591’, ‘3’: ‘CIT593’} print(course[‘4’])

Q:

What is the result of the following code? course = {‘1’: ‘CIT590’, ‘2’: ‘CIT591’, ‘3’: ‘CIT593’} print(course.get(‘4’))

Q:

What is the result of the following code? course = {‘1’: ‘CIT590’, ‘2’: ‘CIT591’, ‘3’: ‘CIT593’} print(course.get(‘4’, ‘CIT594’))

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Find Questions in This Page: "CTRL+F"