The Education ministry ordered the closure of Embakasi Girls' school on Tuesday after it was submerged in floodwaters.
Schools around slums and low-lying areas have been most affected by the rains.
Robert Masese, the ministry's acting director general, said the government was mapping affected schools to avert injuries and deaths.
"It was unfortunate that one school had to be closed in the wake of heavy rains in the city," he said.
Masese warned that schools that do not meet the infrastructure requirements set by the government will be closed.
He noted that flouting building requirements could be a recipe for crises during rainy seasons.
"Learning institutions with substandard buildings should take caution as they endanger the lives of children," he said.
Northern Kenya is among parts where rains have affected learning.
In Wajir and Mandera counties, some schools remain closed after the rains caused floods and the destruction of property.
In Narok, some school structures were destroyed in heavy rains over the last two weeks.
"We hope to give a comprehensive report and data on the most affected institutions next week," the official said.
Also read:
More on rains: