63.0k views
2 votes
For this lab you will find the area of an irregularly shaped room with the shape shown above.

Ask the user to enter the values for the sides A, B, C, D, and E and print out the total room area.


Remember the formula for finding the area of a rectangle is length * width and the area of a right triangle is 0.5 * base * height.


Please note the final area should be in decimal formula.


Sample run :


Enter side A : 11


Enter side B : 2


Enter side C : 4


Enter side D : 7


Enter side E : 1


Output :


Room area: 53.5

1 Answer

5 votes

Answer:

Edhesive Python Answer:

A=int(input("Enter side A: "))

B=int(input("Enter side B: "))

C=int(input("Enter side C: "))

D=int(input("Enter side D: "))

E=int(input("Enter side E: "))

R= A*B

b=A-C

T=1/2*E*b

s=D-(B+E)

S=s*b

TA=S+T+R

print("Room Area: "+ str(TA))

Step-by-step explanation:

Hope this helps :)

User Navin Rawat
by
4.7k points