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 trialMUZ140057 Dumisani Nyamusa
8,029 Pointsstage 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.
3 Answers
MUZ140057 Dumisani Nyamusa
8,029 Pointsclass Sheep(Animal): Animal_class = "sheep", pass
im getting errors where im i wrong guys im stuck
Kenneth Love
Treehouse Guest TeacherYou have to import Animal
from animal.py
.
Annie Scott
27,613 PointsThis was very difficult to figure out Task One
from animal import Animal
class Sheep(Animal):
pass
Eleeza Amin
34,496 PointsEleeza Amin
34,496 PointsCould you use Markdown Cheatsheet for code? It's easier to understand.
Albert Lam
Courses Plus Student 6,317 PointsAlbert Lam
Courses Plus Student 6,317 Pointsthat was weird, when I finally decided to put something inside the class it actually let me pass. lol