Sign InCoursewareNuggetsTutorials AboutClassesCodePad

Making Your Own Phone Book

Use Python's built-in dictionary structure to create your own phone book. Your program should:

  • Creates a dictionary mapping names to phone numbers. Put three items in your hash table to begin.
  • Allows the user to:
    1. add new mappings to the table by entering a name and a number, or
    2. enter a name to see the corresponding phone number.
  • Within a loop, prompt the user to choose operation 1 or 2, then prompt for the necessary inputs, then call the chosen operation.
© CS Wonders·About·Classes·Cheatsheet