Question: What should the comment line TODO be replaced with for the program 195.py, given below, to compute and output the average vehicle price? 11
What should the comment line TODO be replaced with for the program 195.py, given below, to compute and output the average vehicle price? 11 14 195.py Author: Youcef Derbol inport randon MODELS=["Corolla", "F-Series, "Golf", "Civic', "Passat', 'Beetle, "Escort"] YEARS [ 2012, 2013, 2014, 2015, 2016, 2017', '2018') class Vehicle: definit_(self, *args, **krags): args[0] self.model args[1) self year self.price float(args[2]) de info(self): print (self.model, self-year,':',self.price) n 100 db = dict() for i in range(n): 3 randon.randint (0, len(MODELS) -1) k randon.randint(0,len(YEARS)-1) v Vehicle (MODELS[1], YEARS[k], 30+30 randon.randon()). db[1] = V (0) Len(db) for key, value in db.itens(): TODD avg sun(a)/ten(a) print(avg)
Step by Step Solution
3.42 Rating (152 Votes )
There are 3 Steps involved in it
The comment line TODO needs to be changed to the following in order to calculate and output the aver... View full answer
Get step-by-step solutions from verified subject matter experts
