Teo_Yanchev

lunch_break

Jul 7th, 2020
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. from math import ceil
  2. name_tv_show = input()
  3. time_episode = int(input())
  4. time_break = int(input())
  5.  
  6. time_lunch = time_break * 1/8
  7. time_relax = time_break * 1/4
  8. time_left = time_break - (time_lunch + time_relax)
  9.  
  10. diff = abs(time_left - time_episode)
  11. if time_left >= time_episode:
  12. print(f"You have enough time to watch {name_tv_show} and left with {ceil(diff)} minutes free time.")
  13. else:
  14. print(f"You don't have enough time to watch {name_tv_show}, you need {ceil(diff)} more minutes.")
Add Comment
Please, Sign In to add comment