Advertisement
veronikaaa86

08. Lunch Break

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