Question: python Question 3 The time allocated for this question is 15 minutes. At the end of this period, please go to the next question. Otherwise,

 python Question 3 The time allocated for this question is 15

python

Question 3 The time allocated for this question is 15 minutes. At the end of this period, please go to the next question. Otherwise, you may have trouble with the time for the remaining questions. This question is 20 pts. In this program you need to find the average of the numbers which are odd in the list. To implement this question, firstly get n from the user. n is the total number of the items in the list. After getting n value from the user, you can generate 2 random numbers for the starting and ending point of the range of the numbers. Finally, write a function that returns the average of the values that are odd. The prototype of the function is findAverage(start, end); float. You can see the example in the sample output. Do not forget that numbers must be random. Sample Output: Enter the number of items: 5 #This number is a user input which shows the total number of the elements of the list. Random numbers: start: 15 #starting point end: 150 #ending point #After getting n and generating the limits (start and end), call the function findAverage(start, end) #This function generates n items between start and end points. You can see 5 random numbers between 15 and 150.(NUMBERS ARE EXAMPLE! YOUR NUMBERS MUST BE RANDOM NUMBERS!) List - 20, 120, 15, 60, 35 #Generate n (5) numbers, then show all of them on the console. Total Sum - 25 #Show the average of the values which are odd. Activate W Go to Settings

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!