Let's assume you have a list of numbers that you don't recognize. You don't know what these numbers are. You can try to find the numbers from the phone book. In the code section, ask a user for a number. If you find the number, print the owner's name. Otherwise, print Not found.
Index() and in under the hood
Find the name
Report a typo
Sample Input 1:
124-347Sample Output 1:
JohnSample Input 2:
123-231Sample Output 2:
Not foundWrite a program in Python 3
# the dictionary with the phone numbers and names, do not modify it
phone_dict = {"124-347": "John", "123-789": "Bob", "123-456": "Mary", "123-333": "Jack"}
# your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.