Generation

generate functionWed, 12 Apr 2023

mediante poo ingresar una lista de 3marcas de vehículos y 3 marcas de motos con sus características (año, color placas, kilometraje) donde tenga un menu que permita buscar los vehículos ingresados y me permita modificar la marca y las características

class vehicle: def __init__(self, brand, year, color, plates, mileage): self.brand = brand self.year = year self.color = color self.plates = plates self.mileage = mileage class car(vehicle): def __init__(self, brand, year, color, plates, mileage): self.brand = brand self.year = year self.color = color self.plates = plates self.mileage = mileage class motorcycle(vehicle): def __init__(self, brand, year, color, plates, mileage): self.brand = brand self.year = year self.color = color self.plates = plates self.mileage = mileage class garage: def __init__(self, garage): self.garage = garage def add_car(self, car): self.garage.append(car) def add_motorcycle(self, motorcycle): self.

Want to kickstart your project?Use the new AI Studio to create your code