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

Daniel Kondakov
1,337 PointsI provided the "is hungry" argument, but am getting an error that I did not provide a positional argument
I cannot figure out how to fix this error
class Panda:
species = "Ailuropoda melanoleuca"
food = "bamboo"
def __init__(self,is_hungry):
self.is_hungry = True
1 Answer

Rohald van Merode
Treehouse StaffHey Daniel Kondakov 👋
The error happens because your __init__
method is defined to take an is_hungry
parameter, while the challenge asks for only having the self
argument. Since you're initializing is_hungry
to be True
anyway you can simply remove the parameter. This adjustment should pass the challenge as expected 🙂
class Panda:
species = "Ailuropoda melanoleuca"
food = "bamboo"
def __init__(self):
self.is_hungry = True
Hope this helps! 😁