Question: Python-Fall 2020 Homework #2 You are to create a menu driven program that has the following characteristics/functions: Has a function that asks the user for

Python-Fall 2020

Homework #2

You are to create a menu driven program that has the following characteristics/functions:

  1. Has a function that asks the user for their first name and store it to a list.
  2. Has a function that selects a random number for each name and add it to a second list.
  3. The random number must be generated in its own function.
  4. From inside that function, get a random number between 1 and 10.
  5. Has a function that prints out both lists in the format:
    1. Name Random number (ie: Peter 5)
  6. Has a function to only print a single name/number. This function must receive the name and not ask for it inside the function.
  7. The program must be menu driven

Submit the code screen captures of all of the functionality. Submit the .py file AND the screen captures. Di NOT zip or compress the files.

HINTS

If ():

Call get and store name function

Elif:

Call get and store number function (The get number function calls the get random number function)

Elif:

Call function to print both lists

Elif:

Ask for name to print

Call function to print a single name and number

Elif:

Quit

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 Databases Questions!