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 trialRakesh Bharadwaj
1,376 PointsFor now, though, I need you to create a new class, SortedInventory that should be a subclass of Inventory.
It seems simple but don't understand why it gives error
class Inventory:
def __init__(self):
self.slots = []
def add_item(self, item):
self.slots.append(item)
class SortedInventroy(Inventory):
pass
1 Answer
Oszkár Fehér
Treehouse Project ReviewerHi Rakesh
First of all check out if the writing it's correct, SortedInventroy it should be SortedInventory, the last "r" it's in the wrong place. it happened with me also this mistakes and the questions are very sensitive for not naming correctly the classes, functions etc, specially when the quiz ask to put this name or that name i hope this helps
Jamie Marsay
8,320 PointsJamie Marsay
8,320 PointsHi Rakesh!
You're very close to the solution, but your SortedInventory class is missing a method that Inventory has, namely the init method!
Hope that helps!
James.