Question: Problem 6-1 0.0/15.0 points (graded) You are given the following superclass. Do not modify this class Container (object): Holds hashable objects. Objects may occur 0



Problem 6-1 0.0/15.0 points (graded) You are given the following superclass. Do not modify this class Container (object): """Holds hashable objects. Objects may occur 0 or more times"" def init (self): """ Creates a new container with no objects in it. I.e., any object occurs 0 times in self. """ self.vals = {} def insert (self, e): " ""assumes e is hashable Increases the number times e occurs in self by 1. """ self . vals [ e ] += 1 self . vals [ e ] = 1 try: except: def str_(self): for i in sorted (self.vals.keys(): if self.vals[1] = 0: s += str(1)+":"1str ( self.vals[i])+" " return s Write a class that implements the specifications below. Do not override any methods of Container
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
