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 trialAlbert Egberg
7,786 PointsI don't seem to understand this question. Why wouldnt it return True?
I mean has_pulp = True so why whouldnt Orange().squeeze().has_pulp() return true?
1 Answer
Chris Freeman
Treehouse Moderator 68,454 PointsGood question. The quiz states: Orange().squeeze()
will return True
The reference to the class attribute has_pulp
would be self.has_pulp
.
In the context of the quiz, the reference to has_pulp
is undefined and would raise an error
Edited quiz text
Post back if you need more help. Good luck!!!
Albert Egberg
7,786 PointsAlbert Egberg
7,786 PointsYea, that's what I thought aswell, but like you said, it would raise an error. Why does it return False then?
Chris Freeman
Treehouse Moderator 68,454 PointsChris Freeman
Treehouse Moderator 68,454 PointsCorrecting my answer about. The quiz states the reference will return
True
, but due to the error raised this statement is not true => False.Albert Egberg
7,786 PointsAlbert Egberg
7,786 PointsOkey, I will look more into this. Thanks for the help! :)