# Program to find the area and perimeter of a rectangle
length = float(input("Enter the length of the rectangle: "))
width = float(input("Enter the width of the rectangle: "))
# Calculate the area
area = length * width
# Calculate the perimeter
perimeter = 2 * (length + width)
# Display the results
print("Area of the rectangle:", area)
print("Perimeter of the rectangle:", perimeter)
This program will ask the user to enter the length and width of a rectangle as inputs, then calculates the area and perimeter using the formulas area = length * width and perimeter = 2 * (length + width), respectively. Finally, it prints the results of area and perimeter.