Advertisement
veronikaaa86

08. Lunch Break

May 15th, 2022
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import math
  2.  
  3. series = input()
  4. episode_duration = int(input())
  5. break_duration = int(input())
  6.  
  7. lunch_time = break_duration / 8
  8. relax_time = break_duration / 4
  9.  
  10. needed_time = lunch_time + relax_time + episode_duration
  11. rest_time = abs(break_duration - needed_time)
  12.  
  13. if needed_time <= break_duration:
  14. print(f'You have enough time to watch {series} and left with {math.ceil(rest_time)} minutes free time.')
  15. else:
  16. print(f"You don't have enough time to watch {series}, you need {math.ceil(rest_time)} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement