Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Rectangle:
- def __init__(self, ln, wd):
- self.length = ln
- self.width = wd
- def rectangle_area(self):
- return self.length * self.width
- newRectangle = Rectangle(14, 12)
- print("The area of the rectangle is " + str(newRectangle.rectangle_area()))
Add Comment
Please, Sign In to add comment