Advertisement
Dimitar46

Lunch Break

Jun 19th, 2022
897
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import math
  2.  
  3. serial_name = input()
  4. episode_duration = int(input())
  5. break_duration = int(input())
  6.  
  7. lunch_time = break_duration * 1 / 8
  8. respite_time = break_duration * 1 / 4
  9. left_time = break_duration - lunch_time - respite_time
  10. if left_time >= episode_duration:
  11.     print(f"You have enough time to watch {serial_name} and left with {math.ceil(abs(left_time - episode_duration))} minutes "
  12.           f"free time.")
  13. else:
  14.     print(f"You don't have enough time to watch {serial_name}, you need {math.ceil(abs(left_time - episode_duration))} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement