@compact mica
onsinn Uploaded Some Code
having issues with the code in the book, no output or says its undefined? what missing?
Attachment: yetmorecars.py
class Car():
"""A simple attempt to represent a car."""
def __init__(self, make, model, year):
""""Initialize attributes to desribe a car."""
self.make = make
self.model = model
self.year = year
def get_descriptive_name(self):
"""Return a neatly formatted descriptive name."""
long_name = f"{self.year} {self.make} {self.model}"
return long_name.title()
my_new_car = Car('audi', 'a4', 2024)
print(my_new_car.get_descriptive_name())
Car =Car
For safety reasons we do not allow file attachments.