Computer Science, asked by kk6510741, 10 months ago

a
WAP a menu deciven program to calculate
Area of rectangle = lxb
Perimeter of rectangle = 2(l+b)
Diagonal of rectangle =
 \sqrt{l^{2}  + b ^{2} }


Answers

Answered by Anonymous
201

\huge{\underline{\underline{\bf{Python\:(7.3.4))}}}}

\huge{\bigstar{\sf{\underline{Coding}\bigstar}}}

print("1. Calculate area")

print(" 2. Calculate perimeter")

print ("3. Calculate diagonal")

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

if A=1. :

\textsf{length= float(input("Enter the length of the rectangle":))}

\textsf{breadth=float(input("Enter the breadth of the rectangle))}

Area= length×breadth

print("Area of rectangle=", end=' '))

while A= 2. :

Perimeter= 2(length + breadth))

print("perimeter of rectangle=",end=' '))

else :

\textsf{Height=float(input("Enter the height of the rectangle:"))}

Diagonal= √length**2+breadth**2+height**2

print ("enter diagonal=",end=' '))

\huge\textsf{Program ends......}

Similar questions