blob: e96af85797e47feccf1a9a42471adb48bff1b5a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
print("This program calculates the area of a rectangle")
length = float(input("Type in the length : "))
width = float(input("Type in the width : "))
perimeter = (length * 2) + (width *2)
area = length * width
print("The area of the rectangle with a length of", length, "and a width of", width, "is", area)
print("The perimiter of the rectangle with a length of", length, "and a width of", width, "is", perimeter)
|