# Inventory System -- module (starter). # # Define two classes: Item and Inventory. ################################################################### # Item class ################################################################### class Item: def __init__(self, name, weight, value): # TODO: assign name, weight, value to self pass def describe(self): # TODO: return a string like "sword (3.5kg, 50g)" pass ################################################################### # Inventory class ################################################################### class Inventory: def __init__(self): # TODO: assign self.items = [] pass def add(self, item): # TODO: self.items.append(item) pass def remove(self, name): # TODO: walk self.items; if an item has the matching name, # remove it and return it. Otherwise return None. pass def list(self): # TODO: print "Inventory (N items):" then each item on its # own line, then a totals line. pass def total_weight(self): # TODO: sum weights, return total pass def total_value(self): # TODO: sum values, return total pass