Question: Write a python program that prompts the user to enter the center x-, y-coordinates, width, and height of two rectangles and determines whether the second
Write a python program that prompts the user to enter the center x-, y-coordinates, width, and height of two rectangles and determines whether the second rectangle is inside the first or overlaps with the first, or outside the first rectangle (does not overlap) as shown in the following Figure and the sample run below. Make sure to test your program to cover all the 3 cases. Do not use function, use loop and if/elif/else statements. 
w1 w1 hl hl h2 (x1, y1) (x2, y2) I(m2, y2) (b) (a) (a) A rectangle is inside another one. (b) A rectangle overlaps another one
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
