A painter is going to paint a room shaped like a cube with square walls that are 20 feet on each side a gallon of paint can be used to cover 400 ft.² how many gallons of paint should the painter by if he is going to paint the four walls of the room

The total surface area of the four walls in the room would be 4 times the area of one wall. The area of one wall is given by the formula:

A = s²,

where A is the wall's area and s is the side length.

In this case, the side length of the walls is 20 feet. So, the area of one wall is:

A = (20 ft)² = 400 ft².

To find the total area of the four walls, we multiply the area of one wall by 4:

Total area = 400 ft² * 4 = 1600 ft².

Since a gallon of paint can cover 400 ft², the painter should buy:

1600 ft² / 400 ft²/gallon = 4 gallons of paint.

Therefore, the painter should buy 4 gallons of paint.