Codington
0 of 6 problems solved • 0%

Exercise prompt

Repair the Quiet Hour

A value may need to pass two comparisons at once. Python lets you chain them, or combine comparisons with and.

Example

age = 14 in_group = 10 <= age < 15 print(in_group) # True

The left comparison includes 10. The right comparison excludes 15. Both must hold.

Your task

Repair quiet_hour(hour). Quiet reading runs from 14:00 through 16:59. An integer hour in that interval should give True, and any other hour from 0 to 23 should give False.