Advertisement
veronikaaa86

08. Lunch Break

Jul 9th, 2023
923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. import math
  2.  
  3. name_episode = 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. left_time = break_duration - lunch_time - relax_time
  11.  
  12. diff = abs(left_time - episode_duration)
  13. rounded_diff = math.ceil(diff)
  14. if left_time >= episode_duration:
  15.     print(f"You have enough time to watch {name_episode} and left with {rounded_diff} minutes free time.")
  16. else:
  17.     print(f"You don't have enough time to watch {name_episode}, you need {rounded_diff} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement