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. Write a python program that prompts the user to enter the center

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!