Please help with the following two questions using Python and the “return” function. Thanks!

Please help with the following two questions using Python and the “return” function. Thanks!

1. Design a function called get_median that takes as arguments three floating point numbers and returns the median of the three values

2.Design a function called compare_median_average that takes as arguments three floating point numbers. The function should calculate the average and median of these numbers and print the following:

If the median is more than 0.01 bigger than the average, it should print: “the median is X higher than the average

where X is the amount higher the median is than the average to two decimal places.”

If the median is more than 0.01 smaller than the average, it should print: “the median is X smaller than the average

where X is the amount smaller the median is than the average to two decimal places.”

Otherwise it should print: “the median and average are approximately the same”

Complete Answer:

Get Instant Help in Homework Asap
Get Instant Help in Homework Asap
Calculate your paper price
Pages (550 words)
Approximate price: -
Open chat
1
Hello 👋
Thank you for choosing our assignment help service!
How can I help you?