Python Object-Oriented Python Advanced Objects Dream Car

Lisandro Ancewicz
Lisandro Ancewicz
2,669 Points

Can't figure out what' wrong with this exercise

I build this method def str(self): retrun "My Dream Car is {} {}".format(self.make, self.model) What would be wrong

dream_car.py
class DreamCar:
    def __init__(self, make, model):
        self.make = make
        self.model = model

    def __str__(self):
        retrun "My Dream Car is {} {}".format(self.make, self.model)

1 Answer

Brandon White
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Brandon White
Treehouse Moderator

Hi Lisandro,

There are a few issues with your code that are causing you to not pass the challenge, but they're all minor errors with syntax/spelling.

  1. You've spelled return wrong.
  2. Your string is missing a period at the end.
  3. The first letters in Dream and Car are capitalized, but the string you're asked to return does not have the words dream and car capitalized.
  4. You're missing an a after is, in your string.

Fix those tiny things, and you should pass this challenge.

Good luck. :)