Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write it in python code program that stores your contacts' names and their Write an address book email addresses The names and email addresses are

Write it in python code image text in transcribed
image text in transcribed
program that stores your contacts' names and their Write an address book email addresses The names and email addresses are originally stored in a file called phonebook.in, in the format Harry Potter theboywholived@hogwarts.edu Hermione Granger brightestwitch@hogwarts.edu Ron Weasley roonilwazlib@hogwarts.edu Draco Malfoy myfatherwillhearaboutthis@hogwarts.edu Severus Snape halfbloodprince@hogwarts.edu Albus Dumbledore alasearwax@hogwarts.edu Your program should read from the file, storing the names and corresponding email addresses in a dictionary as key-value pairs. Then, the progranm should display a menu that lets the user enter the numbers 1 through 5, each corresponding to a different menu item: 1) look up an email address 2) add a new name and email address 3) change an email address 4) delete a name and email address 5) save address book and exit When the user enters 1, the program should prompt them for a name, and then print the corresponding email address. If there is no dictionary entry under that name, the program should print, "Sorry, no contact exists under that name." When the user enters 2, the program should prompt them for a name and an email address, then add a new key-value pair to the dictionary When the user enters 3, the program should prompt them for a name and a new email address for that contact. It should change the value of thee corresponding dictionary entry to match the new email address

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago