Question: What is the width of the rectangle in the class Rectangle? class Rectangle ( object ) : def _ _ init _ _ ( self

What is the width of the rectangle in the class Rectangle?
class Rectangle(object):
def__init__(self,width =2, height =3, color='r'):
self.height=height
self.width=width
self.color=color
def drawRectangle(self):
import matplotlib.pyplot as plt
plt.gca().add_patch(plt.Rectangle((0,0),self.width, self.height ,fc=self.color))
plt.axis('scaled')
plt.show()
2
3
0
 What is the width of the rectangle in the class Rectangle?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!