Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ONLY ANSWER QUESTION 3. ONLY ANSWER QUESTION 3. 3. In the exercise () function, use the rand_list() function from the previous exercise to create a
ONLY ANSWER QUESTION 3.
ONLY ANSWER QUESTION 3.
3. In the exercise () function, use the rand_list() function from the previous exercise to create a list of nine random three-digit integers. Use two different ways to calculate and print the sum of the list. Also, determine and print the average of the values in the list. 2. Write a Python function named rand_list() that creates and returns a list of random integer values. The function should accept three parameters: the number of list elements to be created, the minimum allowable list value, and the maximum allowable list value. In the exercise2() function, use rand_list() to create a list with a random number of elements (at least 5 but no more than 20) that are all random two-digit integers (i.e., between 10 and 99, inclusive) and then print the list, sort the list, print the sorted list, and finally print the median value in the listStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started