#input the length and the width
length = float(input("Enter the length of the rectangle: "))
width = float(input("Enter the width of the rectangle: "))
#calculates perimeter
perimeter = 2 * (length + width)
#calculates area
area = length * width

print("The perimeter of the rectangle is:", perimeter)
print("The area of the rectangle is:", area)
The perimeter of the rectangle is: 18.0
The area of the rectangle is: 20.0