Question: please help me with this python program , use python 3 give me an answer within 2 hr any answer would be appreciated. How long
please help me with this python program , use python 3
give me an answer within 2 hr any answer would be appreciated.

How long has the light been on: There is a light in a room which lights up only when someone is in the room (think motion detector). You are given a set of intervals in entrance and exit times as single integers, and expected to find how long the light has been on. When the times overlap, you need to find the time between the smallest and the biggest numbers in that interval. Input Description You'll be given a set of two integers per line telling you the time points that someone entered and exited the room, respectively. Each line is a visitor, each block is a room. Example: 13 23 45 Output Description Your program should report the number of hours the lights would be on. From the above example: 3 Input 24 36 13 68 Output: 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
