Question
Write Python programs for each of the following problems. Use example s shown in class as guide to solving the problems below . If you
Write Python programs for each of the following problems. Use examples shown in class as guide to solving the problems below.
If you want to check if your program is producing the right output then do the calculations by hand and then check against your programs output.
First rectangle is larger than the second rectangle
(if the area of first rectangle > area of second rectangle)
OR
Second rectangle is larger than the first rectangle
(if the area of second rectangle > area of first rectangle)
Hint:
You will need variables such as width1, height1, width2, height2 to hold user inputs for widths and heights of the two rectangles. You will also need area1 and area2 to hold the areas of rectangles 1 and 2 respectively (these are calculated values and not user input).
It is OK to use digits in variable names as long as they are not at the beginning of the name.
You will also need a two-way decision structure in this problem.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started