Class Car
Class Car
self.brand = brand
self.model = model
self.color = color
self.engine = engine
self.price = price
def display_info(self):
print("Brand:", self.brand)
print("Model:", self.model)
print("Color:", self.color)
print("Engine:", self.engine)
print("Price:", self.price)
def main():
cars = {
user_input = input("Enter a letter (M for Mercedes, T for Toyota, F for Ford, R for Range Rover):
").upper()
if user_input in cars:
car = cars[user_input]
print("\nCar Information:")
car.display_info()
else:
if __name__ == "__main__":
main()