LearnPy Hub
← Exploratory Data Analysis (EDA) problems
Medium

Outliers by the IQR Rule

The table has one number column, value. Using Q1 and Q3 from quantile(0.25) and quantile(0.75), a value is an outlier if it is below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. Print the lower and upper limits with 2 decimals, then the outliers in their original order (separated by spaces), or none.

Input

A CSV table: a header line, then one line per row (an empty field means a missing value), then a line END.

Output

Two lines: low high, then the outliers or none.

Sample 1

Input
value
12
5
9
2
9
7
3
60
4
6
10
1
8
END
Output
-3.50 16.50
60

Sample 2

Input
value
10
11
12
13
14
END
Output
8.00 16.00
none
solution.py
Output appears here
Hints
Outliers by the IQR Rule · Python practice problem · LearnPy Hub