Answer:
Step-by-step explanation:
The Rectangle and Point class is not provided in this question but was found online. Using that code as guidance I created the following method named contains. This method takes in a Point object and checks to see if the x-axis point is inside the parameters of the Rectangle class and then checks the same for the y-axis. If it is inside the Rectangle then the method returns true otherwise it returns false.
def contains(self, point):
return self.width > point.x >= self.corner.x and self.height > point.y >= self.corner.y