Question: Python: 1. Have a function that creates a list with 20 random integers between 1 and 100 (Assign them dynamically, store the list in a

Python:

1. Have a function that creates a list with 20 random integers between 1 and 100 (Assign them dynamically, store the list in a variable.)

2. Have a function get a number from the user that is between 1 and 100 (validate to ensure a number between 1 and 100 was entered instead of text or something out of range using a try and except statement).

3. Pass both the list and the user's number to a function and have it display all numbers in the list that are greater than the user's number. If there are not any, display a message that explains there are no numbers in the list greater than the entered number.

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!