This is the code I' ve been working on:
define the Vehicle class
class Vehicle:
name = ""
kind = "car"
color = ""
value = 100.00
def description(self):
desc_str = "%s is a %s %s worth $%.2f." % (self.name, self.color, self.kind, self.value)
return desc_str
# your code goes here
car1 = Vehicle()
name = "Fer"
kind = "convertible"
color = "red"
value = 60,000.00
car2 = Vehicle()
name = "Jump"
kind = "van"
color = "blue"
value = 10,000.00
# test code
print(car1.description())
print(car2.description())
I want to make this shorter using init but I haven't succeeded ye