Question: python2.7 1. (10 points) Implement a class Die (that is a subclass of the object class) representing a Die with many sides, default of 6.
>>> dl-Die () >>>d2-Die (30) >>> dl.numSides () >>> d2.numSides () 30 >>> dl.roll() >>>dl.get ) >>>dl.roll () >>>dl.get () 1 >>>d2.roll () >>>d2.get ) 15 >>>d2.get () 15 >>> dl Die (6) >>>d2 Die (30) >>>str (dl) >>>str (d2) 30
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
