Question: Python Question: #1: The below carprices.txt contains a single column of car prices in 1000's. Read this data into your program. The first line is
Python Question:
#1: The below carprices.txt contains a single column of car prices in 1000's. Read this data into your program. The first line is the heading and should be ignored. For any line containing non-numeric data, raise a ValueError exception and print a message saying 'This data is invalid and will be ignored' together with the exception object. You should divide each number by 10 and round it down to the nearest integer. Then plot a histogram that looks like the one shown below. The number of bins to use is 50.
Data in carprices.txt:
Min Price
9
13
13
14
17
18
21
29
33
67
68
69
73
73
74
77
78
79
79
82
84
sb
84
84
85
87
87
91
92
94
104
105
108
109
114
114
115
119
124
128
129
133
134
134
136
gg
138
142
142
142
143
145
145
147
147
148
149
152
154
156
163
166
166
167
175
176
184
185
189
194
195
ll
195
199
201
203
218
224
226
229
237
248
259
263
275
292
295
308
325
333
344
346
df
347
375
438
454
Graph:




Number of cars 10 10 Frenquency of Car Prices 20 30 Price in tens of thousands \fsporty small 15.05% 22.58% van 9.68% 17.20% 23.66% compact 11.83% midsize largeNumber of Students E nrolle l\"Number of Students Enrolled 13000 12000 11000 10000 2600 2400 2200 2000 2003 2003 Student Enrollment Per Year Enrollment of fulltime students 2004 2005 2006 2007 Enrollment of oart-time students R 2004 2005 2006 2007 Years
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
