Question: In this program, you need to create a function (median) that takes three values (a, b, c) as the function parameters, and returns the median.
In this program, you need to create a function (median) that takes three values (a, b, c) as the function parameters, and returns the median.
You will complete this program in several steps.
(1) Print what the program is going to do. (Submit for 1 point)
This Program finds the median value of three numbers entered by the user.
(2) Prompt the user to input numbers. (Submit for 1 points, total 2)
This Program finds the median value of three numbers entered by the user. Input first number: 2 Input second number: 9 Input third number: 1
(3) Create the function (median) that takes the entered numbers (in step 2), and returns the median. Note: The function should have no print statement, the print should be in the main and after you call the 'median' function . (Submit for 8 points, total 10)
This Program finds the median value of three numbers entered by the user. Input first number: 2 Input second number: 9 Input third number: 1 The median is 2
The median is the value separating the higher half from the lower half of a data sample. For a data set, it may be thought of as the "middle" value. For example, in the data set {1,3,3, 6, 7, 8, 9), the median is 6, the fourth largest, and also the fourth smallest, number in the sample. Wikipedia In this program, you need to create a function (median) that takes three values (a, b, c) as the function parameters, and returns the median. You will complete this program in several steps. (1) Print what the program is going to do. (Submit for 1 point) This Program finds the median value of three numbers entered by the user. (2) Prompt the user to input numbers. (Submit for 1 points, total 2) This Program finds the median value of three numbers entered by the user. Input first number: 2 Input second number: 9 Input third number: 1 (3) Create the function (median) that takes the entered numbers (in step 2), and returns the median. Note: The function should have no print statement, the print should be in the main and after you call the median' function. (Submit for 8 points, total 10) This Program finds the median value of three numbers entered by the user. Input first number: 2 Input second number: 9 Input third number: 1 The median is 2 1 bonus.py x Le celsius_to_fahrenheit.py sum_and_average.py median_of_three.py X if_name "_main_": print("This Program finds the median value of three numbers entered by the user.") 2 3 4 a 5 6 CE 7 int(input('Input the first number: ')) b = int(input('Input the second number: ')) int(input('Input the third number: ')) I. def median(a, b, c): return median median(a,b,c) print("The median is", a) 8 9 A 10 11 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts


