Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CIS 1 1 1 5 SP 2 0 2 4 ch 0 4 _ lab 0 2 The area of a rectangle is the length

CIS1115 SP2024 ch04_lab02
The area of a rectangle is the length times the width.
Complete the python program, utilizing online GDB, below to do the following:
1. prompt for the length and width of two (2) rectangles, call them R1 & R2
2. calculate and display the area for each rectangle
3. determine and display which rectangle has the greater area
4. if neither are greater, display that result
======================== copy program below this line ===================================
# student name 2024SP ch04_lab02
'''
The area of a rectangle is the length times the width.
Complete the python program, utilizing online GDB, below to do the following:
1. prompt for the length and width of two (2) rectangles, R1 & R2
2. calculate and display the area for each rectangle
3. determine and display which rectangle has the greater area
4. if neither are greater, display that they are equal
'''
# ========================== prompt for input
length=float(input('enter the length for #1 rectangle '))
width=float(input('enter the width for #1 rectangle '))
R1=length*width
if R1>R2:
print('rectangle R1 is larger than R2')
elif
.
.
.

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

What is the coefficient for the BANK-Dummy variable?

Answered: 1 week ago