Question: python2.7 Implement a container class Stat that is a subclass of object. The class stores a sequence of numbers and provides statistical information about the
>>> s-Stat () >>> s.min () 0.0 >>>s.max () 0.0 >>> 3 . sum ( ) >>> s.mean () 0.0 s.add (3) >>> s.add ( four) four not added. Value must be a number. s.add (4) s.add (Five') Five not added. Value must be a number s.add (5) >> s.min () s .max () >35 . sumO 12 SS> s.mean ) 4.0 SS.Clear ) >> str (s) Stat object with o items >>> s1 Stat ([10, 0 , 301) 2 31.mean ) 20.0 3.max () >s1.max () Note that part of the exercise is to determine which methods you need to implement i to obtain the functionality shown above. Ask the lab assistant if you get stuck on a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
