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 trialJalen Wize
Courses Plus Student 2,559 PointsProper Properties Object-Oriented Python Help
Hi, I may be missing what the question is looking for in part two. It seems rather straightforward. Thanks for the help!
class Rectangle:
def __init__(self, width, length):
self.width = width
self.length = length
@property
def area(self):
return self.width * self.length
@property
def perimeter(self):
return ((self.width * 2) + (self.length * 2))
Louise St. Germain
19,424 PointsNo problem - glad it worked out!
2 Answers
Louise St. Germain
19,424 PointsAre you getting an error? I went to the challenge and copied your code from above into the challenge, and it passed.
Eric M
11,546 PointsMoving this to an answer and marking as best so that this doesn't look like an unresolved 0 answer question to anyone looking to help out.
Mohit N Rajput
2,827 PointsAll code is fine,it is not run in browser some time beacause of some browser's editor indentaion, so if you get error again ident the all code and run
Jalen Wize
Courses Plus Student 2,559 PointsJalen Wize
Courses Plus Student 2,559 PointsI was but now it seemed to work... thanks for confirming!