An office checks its expense receipts. Any receipt whose amount is an outlier by the 1.5 × IQR rule gets a second look, and the finance team also wants the average of the ordinary receipts.
Task: write check_receipts(receipts).
receipts is a list of dictionaries, each with receipt (an id) and amount.amount column, with Q1 and Q3 from pandas quantile(0.25) and quantile(0.75).Return a dictionary with two keys:
"flagged": the ids of the flagged receipts, in the original order ([] if none)"typical_mean": the mean amount of the receipts that were not flagged, rounded to 2 decimal placesThere are always at least two receipts.