Objectives > Using file input output > Processing records Practice with exceptions Command Prompt-pyth... -MENU---- Print Address Book (1) Search Contact (2) Add new Contact (3) Delete Contact (4) Quit (5) Enter your choice K Problem Create a program (addressbook.py) that will manage an individual's address book. The program should allow a user to add new contacts, print the entire address book, search for a contact, delete a contact, and exit the program. These features should work as follows: Part 1: Create a function named Menu to display the menu to the user that contains all the above options using numbers from 1 to 5 (see output above). In function Menu, validate the user input. If validation fails, display a message to the user and display the menu again. If validation is successful, return the user selected choice value from the menu. Create the following functions and simply display the function name within each function (just for testing the menu in this part): > PrintAddress Book > Search Contact > fAddContact >Delete Contact Create function main which is used to orchestrate the entire program. In main, call function Menu and store the returned value in variable choice. Test the variable choice for its value and then call the corresponding function (which will print the function name, for now). For the exit option, ask the user whether they want to continue (yin). If they would like to continue, then display the menu and get input from the user. If not, exit the program Validate the user input, and if the input is not y or n then ask the user again whether they want to continue. Test the functionality in this part before continuing Part 2: Remove the print statements from the individual functions. Add the following functionality to each function: Add new contact: For this option, get the name, street address, and city state zipcode (one line), from the user. Write add them to a file contacts.txt. Write out the file such that all the information about an individual is on separate lines. For example, the name "Mickey" and address "DisneyLand" should be on separate lines rather than on the same line.
Objectives > Using file input output > Processing records Practice with exceptions Command Prompt-pyth... -MENU---- Print Address Book (1) Search Contact (2) Add new Contact (3) Delete Contact (4) Quit (5) Enter your choice K Problem Create a program (addressbook.py) that will manage an individual's address book. The program should allow a user to add new contacts, print the entire address book, search for a contact, delete a contact, and exit the program. These features should work as follows: Part 1: Create a function named Menu to display the menu to the user that contains all the above options using numbers from 1 to 5 (see output above). In function Menu, validate the user input. If validation fails, display a message to the user and display the menu again. If validation is successful, return the user selected choice value from the menu. Create the following functions and simply display the function name within each function (just for testing the menu in this part): > PrintAddress Book > Search Contact > fAddContact >Delete Contact Create function main which is used to orchestrate the entire program. In main, call function Menu and store the returned value in variable choice. Test the variable choice for its value and then call the corresponding function (which will print the function name, for now). For the exit option, ask the user whether they want to continue (yin). If they would like to continue, then display the menu and get input from the user. If not, exit the program Validate the user input, and if the input is not y or n then ask the user again whether they want to continue. Test the functionality in this part before continuing Part 2: Remove the print statements from the individual functions. Add the following functionality to each function: Add new contact: For this option, get the name, street address, and city state zipcode (one line), from the user. Write add them to a file contacts.txt. Write out the file such that all the information about an individual is on separate lines. For example, the name "Mickey" and address "DisneyLand" should be on separate lines rather than on the same line.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
PLeae write in python
The populated contacts.txt file with at least 5 contacts
1 screenshot of executed code in command line/terminal window for the print address book option (either paste
into Word document or as an image)
1 screenshot of executed code in command line/terminal window for the search contact option (either paste into
Word document or as an image)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 6 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education