Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

Take input widths and heights of two rectangles. Compute the area of each rectangle and output them. Also output one of the following,

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago