Write iqr_outliers(values, k=1.5) that takes a list of numbers and returns the positions (0-based) of the values outside Q1 − k × IQR and Q3 + k × IQR, as a list in order. Use pandas quartiles (the default way quantile works out values between rows).
Example: iqr_outliers([10, 12, 11, 13, 12, 95]) → [5].
iqr_outliers([10, 12, 11, 13, 12, 95]) → [5]
iqr_outliers([1, 50, 52, 49, 51, 48, 50]) → [0]
Submit runs 5 tests, including hidden edge cases.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.