Except as otherwise provided in this chapter, every room in which persons live, sleep, work or congregate shall have at least one window or ventilating skylight opening directly either upon a street or upon a rear yard, front yard, side yard, inner court or outer court located upon the same lot and conforming to the requirements prescribed by this chapter as to its minimum area and least dimensions. Courts, yards and other open spaces, if provided in addition to those required by this chapter, need not be of the area and dimensions herein prescribed. No yard, court or other open space provided about any building for the purpose of complying with the provisions of this chapter shall again be used as a yard, court or other open space for another building. The provisions of this chapter shall not be deemed to apply to courts or shafts for bathrooms, toilet compartments, hallways or stairways.