Question: Please use python PROBLEM 1 (33 POINTS): Implement the NumberContainer as shown in the screenshots. The docstrings in the template contain descriptions of each method.
PROBLEM 1 (33 POINTS): Implement the NumberContainer as shown in the screenshots. The docstrings in the template contain descriptions of each method. >nc1-NumberContainer() >>>nc1.addNumber (1) >> nc1.addNumber (2) >>> nc2-NumberContainer () >> nc2.addNumber (2) >>>nc2.addNumber (3) >>str (nc1) I contain [1, 2]' >>> str (nc2) 'I cont tain [2, 3] >>> str (nc3) I contain [1, 2, 2, 3]' >>>nc1.getTotal() >>>nc2.getTotal() >>>ncKnc2 True False >>> nc1_no2 False >>nc4-nc2-nc1 >>>str (nc4) 'I contain [3] >> for i in nc3: print(i) 2 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
