mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 18:38:39 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9a5cb30694
commit
3296963721
@ -46,11 +46,11 @@ def inter_quartile_range(x: List[float]) -> float:
|
||||
raise ValueError
|
||||
x.sort()
|
||||
if length % 2:
|
||||
q1 = find_median(x[0: length // 2])
|
||||
q3 = find_median(x[(length // 2) + 1: length])
|
||||
q1 = find_median(x[0 : length // 2])
|
||||
q3 = find_median(x[(length // 2) + 1 : length])
|
||||
else:
|
||||
q1 = find_median(x[0: length // 2])
|
||||
q3 = find_median(x[length // 2: length])
|
||||
q1 = find_median(x[0 : length // 2])
|
||||
q3 = find_median(x[length // 2 : length])
|
||||
return q3 - q1
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user