Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The attached file receipts.txt contains the records of items purchased from a grocery store. Each record is placed on a seperate line, and consists

The attached file "receipts.txt" contains the records of items purchased from a grocery store. Each record is placed on a seperate line, and consists of comma seperatef feilds containing from left to right) the item ID, and the price. Given the file "receipt.txt", write a program called receipt_analysis.py to find and display the IDs of items whose prices are lower than the median item price. No imported libraries shall be used.
PID-000,$166.27
PID-001,$187.11
PID-002,$16.18
PID-003,$66.57
PID-004,$180.54
PID-005,$199.1
PID-006,$87.62
PID-007,$121.50
PID-008,$57.65
PID-009,$215.52
PID-0010,$298.58
PID-0011,$109.89
PID-0012,$29.38
PID-0013,$46.95
PID-0014,$294.37
PID-0015,$149.12
PID-0016,$148.71
PID-0017,$120.62
PID-0018,$177.13
PID-0019,$145.84
PID-0020,$160.80
PID-0021,$59.17
PID-0022,$240.90
PID-0023,$298.42
PID-0024,$14.24
PID-0025,$157.67
PID-0026,$173.70
PID-0027,$71.12
PID-0028,$189.52
PID-0029,$281.37
PID-0030,$94.82
PID-0031,$58.60
PID-0032,$220.17
PID-0033,$171.72
PID-0034,$72.41
PID-0035,$11.42
PID-0036,$71.2
PID-0037,$191.83
PID-0038,$289.57
PID-0039,$206.90
PID-0040,$174.55
PID-0041,$213.88
PID-0042,$148.97
PID-0043,$39.88
PID-0044,$166.15
PID-0045,$282.90
PID-0046,$261.92
PID-0047,$241.56
PID-0048,$296.93
PID-0049,$177.81
PID-0050,$257.38
PID-0051,$217.7
PID-0052,$98.19
PID-0053,$52.88
PID-0054,$121.37
PID-0055,$58.30
PID-0056,$163.31
PID-0057,$168.63
PID-0058,$168.18
PID-0059,$114.36
PID-0060,$9.20
PID-0061,$232.77
PID-0062,$108.81
PID-0063,$262.91
PID-0064,$284.5
PID-0065,$194.84
PID-0066,$219.82
PID-0067,$233.54
PID-0068,$174.4
PID-0069,$89.59
PID-0070,$276.14
PID-0071,$93.71
PID-0072,$74.84
PID-0073,$257.43
PID-0074,$117.23
PID-0075,$273.44
PID-0076,$212.91
PID-0077,$140.28
PID-0078,$241.90
PID-0079,$293.64
PID-0080,$217.66
PID-0081,$250.34
PID-0082,$9.42
PID-0083,$39.53
PID-0084,$116.93
PID-0085,$166.93
PID-0086,$10.88
PID-0087,$111.74
PID-0088,$261.48
PID-0089,$73.65
PID-0090,$121.78
PID-0091,$164.4
PID-0092,$160.38
PID-0093,$236.95
PID-0094,$249.51
PID-0095,$273.98
PID-0096,$269.57
PID-0097,$3.26
PID-0098,$170.64
PID-0099,$20.77
PID-00100,$29.5
PID-00101,$204.6
PID-00102,$175.0
PID-00103,$259.33
PID-00104,$164.30
PID-00105,$29.83
PID-00106,$124.60
PID-00107,$151.91
PID-00108,$263.64
PID-00109,$37.80
PID-00110,$75.4
PID-00111,$15.29
PID-00112,$241.5
PID-00113,$117.42
PID-00114,$152.93
PID-00115,$298.89
PID-00116,$1.20
PID-00117,$2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago