Answer:
In Python:
doorLength = float(input("Door Length: "))
doorWidth = float(input("Door Width: "))
windowLength1 = float(input("Window 1 Length: "))
windowWidth1 = float(input("Window 1 Width: "))
windowLength2 = float(input("Window 2 Length: "))
windowWidth2 = float(input("Window 2 Width: "))
shelfLength = float(input("Bookshelf Length: "))
shelfWidth = float(input("Bookshelf Width: "))
totalarea = doorLength * doorWidth + windowLength1 * windowWidth1 + windowLength2 * windowWidth2 + shelfLength*shelfWidth
gallons = totalarea/120
print("Gallons: "+str(gallons))
Step-by-step explanation:
The next two lines get the dimension of the door
doorLength = float(input("Door Length: "))
doorWidth = float(input("Door Width: "))
The next two lines get the dimension of the first window
windowLength1 = float(input("Window 1 Length: "))
windowWidth1 = float(input("Window 1 Width: "))
The next two lines get the dimension of the second window
windowLength2 = float(input("Window 2 Length: "))
windowWidth2 = float(input("Window 2 Width: "))
The next two lines get the dimension of the shelf
shelfLength = float(input("Bookshelf Length: "))
shelfWidth = float(input("Bookshelf Width: "))
This calculates the total area of the door, windows and bookshelf
totalarea = doorLength * doorWidth + windowLength1 * windowWidth1 + windowLength2 * windowWidth2 + shelfLength*shelfWidth
This calculates the number of gallons needed
gallons = totalarea/120
This prints the number of gallons
print("Gallons: "+str(gallons))