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 trial

Python Object-Oriented Python Instant Objects Master Class

CODE CHALLENGE ANSWERS ON MY WORKSPACE

My workspace is refusing to accept the answers of the code challenges but yet the same answer is passing to some people's workspaces. l don't know what could be really the problem because this has been happening for quite sometime and its slowing down my progress.

racecar.py
 class RaceCar:
        def __init__(self,color,fuel_remaining, **kwargs):
            self.color = color
            self.fuel_remaining = fuel_remaining
            for key, value in kwargs.items():
                setattr(self, key, value)

1 Answer

Steven Parker
Steven Parker
230,995 Points

The code looks good, except for indentation.

The "class" line is currently indented one space, but it should begin at the left edge. Fix that and you'll pass the challenge.

The other spacing won't cause an issue, but it would be better to use consistent indentation levels throughout the code.