Advertisement
sredo

03. Cat Training Attendance

Jun 20th, 2018
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. start_hour = int(input())
  2. check_hour = int(input())
  3. check_minutes = int(input())
  4. week_day = input()
  5.  
  6. bonus = 0
  7.  
  8. time = (check_hour - start_hour) * 60
  9. time = time + check_minutes
  10.  
  11. if time < 0:
  12. bonus = 1.5
  13. elif time >= 0 and time <= 30:
  14. bonus = 1
  15. elif time > 30:
  16. bonus = 0.5
  17.  
  18. if week_day == 'Monday' or week_day == 'Wednesday' or week_day == 'Friday':
  19. bonus += 0.6
  20. elif week_day == 'Tuesday' or week_day == 'Thursday' or week_day == 'Saturday':
  21. bonus += 0.8
  22. elif week_day == 'Sunday':
  23. bonus += 2
  24.  
  25. print(f'{bonus:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement