rebuilt interval comparisons task_05.py