Question: Assignment: PYTHON Advanced Rectangle Calculator Description: Create an object-oriented program in PYTHON that performs calculations on a rectangle. Console: Rectangle Calculator Height: 10 Width: 20
Assignment: PYTHON Advanced Rectangle Calculator
Description: Create an object-oriented program in PYTHON that performs calculations on a rectangle.
Console:
Rectangle Calculator Height: 10 Width: 20 Perimeter: 60 Area: 200 Continue? (y/n): y Height: 5 Width: 10 Perimeter: 30 Area: 50 Continue? (y/n): n
Bye!
Specifications:
Use a Rectangle class that provides attributes to store the height and width of a rectangle. This class should also provide methods that calculate the perimeter and area of the rectangle.
When the program starts, it should prompt the user for height and width. Then, it should create a Rectangle object from the height and width and use the methods of that object to get the perimeter, area, and string representation of the object.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
