Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


classes and object

Abhishek ShekharAbhishek Shekhar Member Posts: 1

adding two rectangle objects should add their corresponding lengths and widths and return a new rectangle
for example: r1 = Rectangle(2, 3)
r2 = Rectangle(4, 5)
r3 = r1 + r2
Here, r3 should have a length of 6 and width of 8
the rectangle object should have its “string representation”
for example:
print r3 should print the following on the screen:
Length: 6 Width: 8

Sign In or Register to comment.