
dictionary
Quiz
•
Computers
•
University
•
Medium
Valerie Chan
Used 1+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
combo_meals = {1: ["hamburger", "fries"],
2: ["hamburger", "fries", "soda"],
4: ["veggie burger", "salad", "soda"],
6: ["hot dog", "apple slices", "orange juice"]}
print(combo_meals[2])
"soda"
["veggie burger", "salad", "soda"]
keyerror
["hamburger", "fries", "soda"]
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
combo_meals = {1: ["hamburger", "fries"], 2: ["hamburger", "fries", "soda"], 4: ["veggie burger", "salad", "soda"], 6: ["hot dog", "apple slices", "orange juice"]}
print(combo_meals[3])
"Hamburger"
"Keyerror"
["hot dog", "apple slices", "orange juice"]
["veggie burger", "salad", "soda"],
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
inventory = {"iron spear": 12, "invisible knife": 30, "needle of ambition": 10, "stone glove": 20, "the peacemaker": 65, "demonslayer": 50}
print("the peacemaker" in inventory)
False
Keyerror
True
65
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
inventory = {"iron spear": 12, "invisible knife": 30, "needle of ambition": 10, "stone glove": 20, "the peacemaker": 65, "demonslayer": 50}
print(12 in inventory)
Key error
"Iron Spear"
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which of the following lines of code would remove "Breakdancing" from the list olympic_sports.
olympic_sports = ["Hockey", "Swimming", "Fencing", "Volleyball", "Breakdancing"]
olympics_sports.pop(3)
olympics_sports.pop()
olympics_sports.pop(-2)
olympics_sports.pop["Breakdancing"
6.
OPEN ENDED QUESTION
3 mins • 5 pts
what is the code to slice the list ["b", "c"] from mylist:
mylist = ["a", "b", "c", "d", "e"]
Evaluate responses using AI:
OFF
7.
OPEN ENDED QUESTION
1 min • 5 pts
Which of the following would be generated by the code snippet?
mylist = ["a", "b", "c", "d", "e", "f"]
print(mylist[2:5])
Evaluate responses using AI:
OFF
8.
MULTIPLE CHOICE QUESTION
3 mins • 5 pts
Which of the following commands will return the length of the list mylist?
mylist.length()
mylist.len()
len(mylist)
mylist.len(0)
Similar Resources on Wayground
10 questions
Pandas DataFrame Quiz
Quiz
•
University
10 questions
UTS PEMROGRAMAN VISUAL
Quiz
•
University
10 questions
IT 5 - Review
Quiz
•
University
10 questions
Aula8
Quiz
•
University
7 questions
Quiz CNV
Quiz
•
University
7 questions
Câu hỏi về kim loại và tính chất của chúng
Quiz
•
University
10 questions
PYTHON_CHAPTER 3
Quiz
•
University
10 questions
Quis Bahasa Pemograman 3
Quiz
•
University
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
7 questions
Central Idea of Informational Text
Interactive video
•
4th Grade - University
7 questions
Review for You: Using Commas
Interactive video
•
4th Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
Safari Scholar: Searching for Subject-Verb Agreement
Interactive video
•
4th Grade - University
