Python 3 for Beginners: Working with Dictionaries

Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Hard
Wayground Content
FREE Resource
Read more
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create an empty dictionary in Python?
empty_dict = ()
empty_dict = []
empty_dict = ''
empty_dict = {}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you add a new key-value pair to an existing dictionary?
Use the insert() method
Use the add() method
Use the append() method
Assign a value to a new key using square brackets
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function can be used to find the number of items in a dictionary?
size()
len()
count()
length()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a key difference between the values stored in a dictionary?
Values can be of different data types
Values must be of the same data type
All values must be integers
All values must be strings
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you check if a specific key exists in a dictionary?
Use the in keyword
Use the find() method
Use the has_key() method
Use the exists() method
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'values' method return when used on a dictionary?
A list of dictionaries
A list of values
A list of key-value pairs
A list of keys
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you want to check if a value exists in a dictionary, which syntax would you use?
value in dictionary.items()
value in dictionary
value in dictionary.values()
value in dictionary.keys()
Similar Resources on Wayground
6 questions
Django3- Dictionaries

Interactive video
•
University
8 questions
Python for Everybody: The Ultimate Python 3 Bootcamp - Looping Through Dictionaries

Interactive video
•
University
2 questions
Python 3 for Beginners: Working with Dictionaries

Interactive video
•
University
6 questions
The Complete Python Course - How to Create a Dictionary

Interactive video
•
University
6 questions
Python In Practice - 15 Projects to Master Python - Arbitrary Keyword Arguments (**kwargs)

Interactive video
•
University
4 questions
EDA Python - 10-1_Dictionaries

Interactive video
•
University
6 questions
Python 3 for Beginners: Working with Dictionaries in Python

Interactive video
•
University
6 questions
Develop a computer program to solve a problem using control structures : For Loops II

Interactive video
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University