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 Basic Object-Oriented Python Welcome to OOP Creating a Panda Class

Will Duong
Will Duong
94 Points

I tested the script in visual studio code and it works, but it is not working on this website....

does this affect my coursework?

panda.py
# insert your code here
class Panda:
    species = "Ailuropoda melanoleuca"
    food = "bamboo"

    def __init__(self,is_hungry=True):
        self.is_hungry = is_hungry

1 Answer

Steven Parker
Steven Parker
231,236 Points

Visual Studio can only detect syntax errors, it has no idea if your code is doing what the instructions asked for.

The instructions for task 2 say "Add an init method to your class. It should only take the self argument.", but this code has the method taking two arguments instead.

You should have also gotten this hint when you tried it:

"Bummer: AssertionError: 1 != 2 : Your method should only take the self argument"