James W. answered 06/23/23
MIT Math and Computer Science Teacher
Hi,
Please see the code above.
(1) For this one, we're going to define a class Rectangle which we will use to instantiate our rectangle of width 10 and height 5. We do this by defining an init class which allows us to use the syntax Rectangle(10,5)
(2) next we create a method which tests if a point is inside the rectangle using the hint you provided
(3) finally we get our x, y input from our user and call the function using the instantiated Rectangle.
Hope this is clear!