Advertisement
veronikaaa86

08. Lunch Break

Jul 10th, 2022
494
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_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. time = break_duration - lunch_time - relax_time
  11.  
  12. diff = abs(episode_duration - time)
  13. rounded = math.ceil(diff)
  14. if time >= episode_duration:
  15. print(f"You have enough time to watch {name_episode} and left with {rounded} minutes free time.")
  16. else:
  17. print(f"You don't have enough time to watch {name_episode}, you need {rounded} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement