Challenge: Contact book
Create a mini contact book using a dictionary:
Create a dictionary called
contacts.Add at least three contacts (e.g., family, friends, places) as keys and their phone numbers as values.
Use a
print()statement to display one of the contact’s phone numbers in a friendly sentence.
Similar Problems
Quiz: Choose Your Own Adventure
Challenge: Add Layers to Your Adventure
Python Dictionaries: Store and Retrieve Key-Value Pairs
Quiz: Dictionaries
Challenge: Teach Your Code to Remember Lots of Things!
Python Lists of Dictionaries: Model Tabular Data
Quiz: Nested Data Structures
Challenge: Class Grades
Python File I/O: Read, Write, and Append Text Files
Quiz: Read and Write Text Files
Challenge: Contact book
Create a mini contact book using a dictionary:
Create a dictionary called
contacts.Add at least three contacts (e.g., family, friends, places) as keys and their phone numbers as values.
Use a
print()statement to display one of the contact’s phone numbers in a friendly sentence.
Similar Problems
Quiz: Choose Your Own Adventure
Challenge: Add Layers to Your Adventure
Python Dictionaries: Store and Retrieve Key-Value Pairs
Quiz: Dictionaries
Challenge: Teach Your Code to Remember Lots of Things!
Python Lists of Dictionaries: Model Tabular Data
Quiz: Nested Data Structures
Challenge: Class Grades
Python File I/O: Read, Write, and Append Text Files
Quiz: Read and Write Text Files