Question: Help with computer science python question please. 2, (10 points) Given the Python class below, perform the tollowing tasks: a. Name all mutator methods b.
Help with computer science python question please. 2, (10 points) Given the Python class below, perform the tollowing tasks: a. Name all mutator methods b. Give the output c. Give code to create a sibling class to Rectangle named RightTriangle d. Give code to create a RightTriangle, RT, class Shape: def-init-(self, width, height): self.w-width self.h - height def setwidth (self, width): self.w- width def setHeight (self, height): self.h height class Rectangle (Shape): def name (self) return "rectangle" def area (self): return (self.w self.h) def main): 6) r= Rectangle (3, r.setWidth (4) print ('The '.name () + 'has an area of ' str (r.area ())+ . main ()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
