Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Write 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions