Your program is going to create a searchable contact list. The program should read names and phone numbers entered from the keyboard and store them in two different parallell lists. Step 1: You do not know how many names/numbers will be entered so your program will first ask the user how many names/numbers will be entered. Step 2: Your program will then have a for loop that uses that number to control how many times it repeats the following steps (3-4). Step 3: Within the for loop your program should ask for and input the name and ask for and input the phone number. Step 4: Within the loop, each name should be stored in a names list and each number should be stored in a phone number list. Step 5: After all the information has been entered and the for loop ends, your program will display a nicely formatted table with a list of all the names and phone numbers. See sample output below Step 6: After displaying the contacts, your program should task the user if all the phone numbers are correct. If the user answers "no" , the program will ask the user for the name of the person whose number is wrong and also ask for the correct number. Using the index method of the list class, your program will find the index position of where the name is in the names list so that you can use that index to change the corresponding phone number in the phone number list with the corrected phone number the user entered. See slides 15 powerpoint PP3 and slide 24 PP4 for an example of the index method. as well as an example of changing a value in a list. If there has been a change in the list display again each name and phone number in the corrected list. See sample output below: Sample run1: How many names and phone numbers do you want to enter? 5 Enter the name Tom Enter the number 972-234-7777 Enter the name Joe Enter the number 213-660-9484 Enter the name Sam Enter the number 675-222-4545 Enter the name Henry Enter the number 456-790-6650 Enter the name Jack Enter the number 213-456-7890 Here is your contact list: Tom          972-234-7777 Joe           213-660-9484 Sam         675-222-4545 Henry       456-790-6650 Jack          213-456-7890 Are all the phone numbers correct? Yes Sample run 2: How many names and phone numbers do you want to enter? 3 Enter the name Jane Enter the number 234-5678 Enter the name Joe Enter the number 213-660-9484 Enter the name Sally Enter the number 675-222-4545 Here is your contact list: Jane            234-5678 Joe              213-660-9484 Sally            675-222-4545 Are all the phone numbers correct? No Enter the name of the person whose number needs to be corrected Jane Enter the correct phone number for Jane 214-234-5678 Here is your corrected contact list: Jane            214-234-5678 Joe              213-660-9484 Sally            675-222-4545

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
icon
Related questions
icon
Concept explainers
Question

Your program is going to create a searchable contact list. The program should read names and phone numbers entered from the keyboard and store them in two different parallell lists.
Step 1: You do not know how many names/numbers will be entered so your program will first ask the user how many names/numbers will be entered.
Step 2: Your program will then have a for loop that uses that number to control how many times it repeats the following steps (3-4).
Step 3: Within the for loop your program should ask for and input the name and ask for and input the phone number.
Step 4: Within the loop, each name should be stored in a names list and each number should be stored in a phone number list.

Step 5: After all the information has been entered and the for loop ends, your program will display a nicely formatted table with a list of all the names and phone numbers. See sample output below

Step 6: After displaying the contacts, your program should task the user if all the phone numbers are correct. If the user answers "no" , the program will ask the user for the name of the person whose number is wrong and also ask for the correct number. Using the index method of the list class, your program will find the index position of where the name is in the names list so that you can use that index to change the corresponding phone number in the phone number list with the corrected phone number the user entered.
See slides 15 powerpoint PP3 and slide 24 PP4 for an example of the index method. as well as an example of changing a value in a list.

If there has been a change in the list display again each name and phone number in the corrected list. See sample output below:

Sample run1:

How many names and phone numbers do you want to enter?

5

Enter the name

Tom

Enter the number

972-234-7777

Enter the name

Joe

Enter the number

213-660-9484

Enter the name

Sam

Enter the number

675-222-4545

Enter the name

Henry

Enter the number

456-790-6650

Enter the name

Jack

Enter the number

213-456-7890

Here is your contact list:

Tom          972-234-7777

Joe           213-660-9484

Sam         675-222-4545

Henry       456-790-6650

Jack          213-456-7890

Are all the phone numbers correct?

Yes

Sample run 2:

How many names and phone numbers do you want to enter?

3

Enter the name

Jane

Enter the number

234-5678

Enter the name

Joe

Enter the number

213-660-9484

Enter the name

Sally

Enter the number

675-222-4545

Here is your contact list:

Jane            234-5678

Joe              213-660-9484

Sally            675-222-4545

Are all the phone numbers correct?

No

Enter the name of the person whose number needs to be corrected

Jane

Enter the correct phone number for Jane

214-234-5678

Here is your corrected contact list:

Jane            214-234-5678

Joe              213-660-9484

Sally            675-222-4545

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Operators
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education