Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-328

Midrange Value

Problem

The midrange is the average of the minimum and maximum: (min + max) / 2.

Given the values, return the midrange.

Hint

Only the two extremes matter.

Test cases

case 1
in: [[1,5]]
expected: 3
case 2
in: [[-2,2]]
expected: 0
case 3
in: [[3,3,3]]
expected: 3
Starter codePython
def midrange_value(values):
    # Your code here
    pass

3 test cases · run your code against them in the editor