(A) It shall be unlawful for any person or persons to fire, set off or explode any pistol, air pistol, rifle, air rifle, gun, cannon or explosive charge of any kind within the city.
(B) The provisions of this section shall not apply to any police officer while in the discharge of his police duty, or to any person exercising his right of self-defense according to law.
('77 Code, § 12-2) Penalty, see § 10.99