Programming Examples

Python program to obtain length and breath of a rectangle and calculate its area


Python program to obtain length and breath of a rectangle and calculate its area

Solution

length=float(input("Enter the length of rectangle : "))
breadth=float(input("Enter the breadth of rectangle : "))
area=length*breadth
print("Rectangle  specifications ")
print("Length : ",length," Breadth : ",breadth," Area : ",area)
▶ RUN

Output/ Explanation:

Enter the length of rectangle : 6

Enter the breadth of rectangle : 5

Rectangle  specifications 

Length :  6.0  Breadth :  5.0  Area :  30.0

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad