Question: PLEASE HELP Python Code 1. Populate a list of size n = 25 with random integers in the range 10 ---- 60 inclusive but do

PLEASE HELP Python Code

1. Populate a list of size n = 25 with random integers in the range 10 ---- 60 inclusive but do NOT include any duplicates. The list of n integers should include only unique values Strategy Generate a random integer (1) If it NOT in the list add the integer to the list (see the python in operator) Else return to (1) and generate another random integer USE the fill() function in the template below but note it has to be modified to eliminate duplicates

2. Display the list using the display() function. But with 5 integers per line (total of 5 lines)

3. Display the list in sorted order (largest to smallest) by calling sortDescending

4. Display the sum of all the integers in the list using your sum() function

5. Display the minimum integer in the list using your minValue() function min

6. Display the maximum integer in the list using your function maxValue()

7. Display the average of the integers in the list using your function ave()

8. Display the number of even integers using your function evens() and

9. Display the number of odd integers (use function odds() )

10. Display the number of integers in the list that have 1 as their first digit i.e how many integers are of the form 1x using the function digit1xx()

11. Display the number of integers in the list that have 1 as their last digit i.e how many integers are of the form x1 using the function digitxx1()

12. Display the number of integers in the list that are divisible by 3 evenly with no remainder ( if x % 3 == 0 count the integer ) using function div3()

13. Ask the user for an integer and display the number of times the integer appears in the list by calling the nCount() function HINT: see the count function in Lab 06

14. Print the median call median() function

15. Display the average of the largest and smallest integers in the list Please use your maxValue() and minValue() functions use the maxMinAve() OUTPUT EXAMPLE

the list == [13, 35, 46, 50, 46, 44, 22, 21, 13, 27, 20, 12, 21, 36, 24, 42, 10, 49, 40, 37, 43, 46, 47, 46, 27]

3 the sorted array largest to smallest is [13, 35, 46, 50, 46, 44, 22, 21, 13, 27, 20, 12, 21, 36, 24, 42, 10, 49, 40, 37, 43, 46, 47, 46, 27]

4 Sum == 10000

5 Minimum 35

6 Maximum == 35

7 Average == 13

8 the number of even integers == -100

9 the number of odd integers == -100

10 the number of integers that start with the digit 1 == 22

11 the number of integers that end with the digit 1 == -22

12 the number of integers that are divisible by 3 with no remainder == 10000

please enter a search integer 333

13 the number of times 333 is in the list : 10000

14 the median of the list is 10000

15 the average of the maximum and minimum 1000

Process finished with exit code 0

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!