Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem The area of a rectangle is the rectangle's length x width. Write a program that anks the user for the length and width of

image text in transcribed
image text in transcribed
Problem The area of a rectangle is the rectangle's length x width. Write a program that anks the user for the length and width of two rectangles and calculates the area of each rectangle. It should print out a message indicating whether the area of the 2 rectangles are equal or not. The messages should say "The rectargles have the same area: 100.78 or "The rectangles do not have the same area: 100.78 and 28.45 Note: The length and width can be decimal numbers. Print the area with only 2 digits after the decimal Input Format floating-point numbers Constraints none Output Format whether rectangles have same area or not Sample Input o 10 20 40 Sample Output Enter length A: Enter width A: Enter length 8: Enter width B: Area A: 200. Area B: 200.0 Ar eas are equal Sample Input Ask me anything 18 40 Sample Output o Enter Tength A: Enter width A: Enter length B: Enter width B: Area A: 209.0 Area B: 200.0 Areas are equal Sample Input 1 20 30 10 20 Sample Output Enter length A: Enter width A: Enter length B: Enter width 8: Area A: 60e.e Area B: 200.00 Areas are NOT equal Current Buffer (saved locally, editable) Po AreaA 2 varA int (input("Enter length A: ")) 3 varB int (input("Enter width A: ")) 4 varC int (input("Enter length B: ")) 5 varD int(input ("Enter width B: ")) 7 print (A B) print (C D) Ask me anything

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions