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 (retired) Inheritance Override Inherited Methods

stage 2 inheritance

Make a new class named Sheep that inherits from Animal. The Animal class is in animal.py. Remember, you can use pass to make empty classes.

sheep.py

3 Answers

class Sheep(Animal): Animal_class = "sheep", pass

im getting errors where im i wrong guys im stuck

Eleeza Amin
Eleeza Amin
34,496 Points

Could you use Markdown Cheatsheet for code? It's easier to understand.

Albert Lam
Albert Lam
Courses Plus Student 6,317 Points

that was weird, when I finally decided to put something inside the class it actually let me pass. lol

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

You have to import Animal from animal.py.

This was very difficult to figure out Task One

from animal import Animal class Sheep(Animal):
pass