Question: Create a python application that will calculate the average of a sequence of numbers entered in by the user. Begin by prompting the user how

 Create a python application that will calculate the average of a

Create a python application that will calculate the average of a sequence of numbers entered in by the user. Begin by prompting the user how many numbers that they would like to average together. Parse the input to integer. This integer value will determine how many times the loop will execute. Initialize an accumulator variable that will store the total to be averaged. Also initialize a counter variable to control the loop. Create a counter-controlled while loop that will terate a certain number of times as specifed by the user. Each iteration of the loop should prompt the user for another number to add to the total. After the loop has finished, caculate the final average and display the resuits to the user, Don't use integer division which will give you inaccurate results Encapsulate your counter-controlled average algorithm into it's own function. The function should accept as input the quantity of numbers to average together. The return value sbould be the final average

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!