Explain how painting of an iron gate prevents it from rusting

Explain how painting of an iron gate prevents it from rusting.

Answer:
Painting the iron gate prevents the contact of iron from air. Since rusting is possible only in presence of moist air, no rusting occurs on painting.