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)
Output
Enter the length of rectangle : 6
Enter the breadth of rectangle : 5
Rectangle specifications
Length : 6.0 Breadth : 5.0 Area : 30.0