Challenge 1: Implement a Rectangle Class
Understand how to implement a Rectangle class in Python by defining its constructor to store x and y coordinates of two corners. Learn to use the self keyword to initialize class instances and validate rectangle creation based on coordinate input.
We'll cover the following...
We'll cover the following...
Problem Statement
-
Implement a class named Rectangle to store the coordinates of a rectangle given the top-left corner (x1, y1) and the bottom-right corner (x2, ...