In: Computer Science
You must write the following methods:
use python 3.7
The question is missing the sample outputs, nevertheless the class has been fully implemented. ============================================================================== class Volume(): def __init__(self, vol=0): self.volume = vol if self.volume > 11: self.volume == 11 if self.volume < 0: self.volume = 0 def __repr__(self): return 'Stereo Volume: {}'.format(self.volume) def set(self, vol): self.volume = vol if self.volume > 11: self.volume == 11 if self.volume < 0: self.volume = 0 def get(self): return self.volume def up(self): self.volume += 1 if self.volume > 11: self.volume == 11 def down(self): self.volume -= 1 if self.volume < 0: self.volume = 0 def __eq__(self, other): if isinstance(other, Volume): return self.volume == other.volume else: return False