I can’t figure out why I can’t input anything after I run…
Question Answered step-by-step I can’t figure out why I can’t input anything after I run… I can’t figure out why I can’t input anything after I run program??? help class Auto_class: def __init__(self): self.make = “” self.model = “” self.color = “” self.year = 0 self.mileage = 0def add_vehicles(self): self.year = int(input(“please enter a year: “)) self.make = int(input(“please enter a make: “)) self.model = int(input(“please enter a model: “)) self.color = int(input(“please enter a color: “)) self.mileage = int(input(“please enter a mileage: “))def __str__(self): return(‘%d %s %s color: %s mileage: %d’ % (self.year, self.make, self.color, self.model, self.mileage)) vehicle_list = [] def edit(vehicle_list): pos = int(input(‘enter the position of the vehicle to edit: ‘)) new_vehicle = car.add_vehicle() new_vehicle = car.__str__() vehicle_list[pos-1] = new_vehicle print(‘Vehicle was updated’) user = True while user: print(“”” 1. add a vehicle 2. delete a vehicle 3. view inventory 4. update inventory 5. output all vehicle inventory 6. quit “””) ans = input(“what would you like to do? “) if ans == “1”: car = auto_class() car.add_vehicle() vehicle_list.append(car.__str__()) elif ans == “2”: for i in vehicle_list: vehicle_list.pop(input(“enter position of vehicle to remove: “)) print(“Successfully removed vehicle”) elif ans == “3”: print(vehicle_list) elif ans == “4”: edit(vehicle_list) elif ans == “5”: f = open(‘vehicle_inv.txt’, ‘w’) f.write(str(vehicle_list)) f.close() Elseprint(‘try again’) Computer Science Engineering & Technology Python Programming ITS 320 Share QuestionEmailCopy link Comments (0)


