Question: You are to create a menu driven program that tracks two lists; a list of names and a list of numbers. We are assuming that

You are to create a menu driven program that tracks two lists; a list of names and a list of numbers. We are assuming that the names and numbers are in pairs, so the first name in the name list matches with the first number in the numbers list. The program must have the following characteristics/functions:
1. Has a function that asks the user for their first name and stores it to a list and a random number to a second list.
2. Has a function that selects a new random number for each name that is currently in the names list and replaces the corresponding number in the numbers list.
3. The random number must be generated in its own function.
4. From inside the random number function, get a random number between 1 and 10.
5. Has a function that prints out both lists in the format:
a. Name Random number (ie: Peter 5)
6. Has a function to only print a single name/number when given a name from the user.. This function must be passed the name and not ask for it inside the function.
7. The program must be menu driven

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!