Question: A Python program that reads in 3 integers or 4 integers (user first determines 3 or 4 integers) and displays the following: a.the average of

A Python program that reads in 3 integers or 4 integers (user first determines 3 or 4 integers) and displays the following:

a.the average of the numbers (two decimal places suggested)

b.the maximum of the numbers

c.the minimum of the numbers

d.the median of the numbers. Note that if there was 2 numbers that qualify for the median, you will calculate and display the mean of the 2 numbers

Do NOT use statistical functions such as mean(), median(), max() or min().

A sample run is shown below:

Enter set of 3 or 4 integers: 3

Enter first number: 7

Enter second number: 10

Enter third number: 1

The average of 7, 10 and 1 is: 6.0

The maximum of the three numbers is:10

The minimum of the three numbers is: 1

The median of the three numbers is: 7

Enter set of 3 or 4 integers: 4

Enter first number: 7

Enter second number: 10

Enter third number: 1

Enter fourth number: 6

The average of 7, 10 ,1 and 6 is: 6.0

The maximum of the four numbers is:10

The minimum of the four numbers is: 1

The median of the four numbers is: 6.5

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 Programming Questions!