In the Sumerian civilization, the purpose of a ziggurat was to

Ahold back floodwaters.
Bkeep the gods and goddesses happy.
Cirrigate the fields.
Dprotect the people from foreign invaders.

Verified Answer :

A Ziggurat is a building, and specifically a temple. (as such it cant be used to hold back floodwaters or irrigate fields: it's a building).

the correct answer is: B. keep the gods and goddesses happy.

However, it is speculated that they could also have been used during invasions for protection, but this was not their major function.