Question: 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

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!