Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLisandro Ancewicz
3,270 PointsCan'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
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
Full Stack JavaScript Techdegree Graduate 34,662 PointsHi 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.
- You've spelled return wrong.
- Your string is missing a period at the end.
- 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.
- You're missing an a after is, in your string.
Fix those tiny things, and you should pass this challenge.
Good luck. :)