Advertisement
Spocoman

Cat Training Attendance

Jan 8th, 2022
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. start_hours = int(input())
  2. check_hours = int(input())
  3. check_minutes = int(input())
  4. day_of_week = input()
  5.  
  6. bonus_points = 0
  7.  
  8. if check_hours < start_hours and check_hours <= (start_hours - 1):
  9.     bonus_points = 1.5
  10. elif check_hours == start_hours and check_minutes <= 30:
  11.     bonus_points = 1
  12. elif (check_hours == start_hours and check_minutes > 30) or check_hours <= (start_hours + 4):
  13.     bonus_points = 0.5
  14.  
  15. if day_of_week == "Monday" or day_of_week == "Wednesday" or day_of_week == "Friday":
  16.     bonus_points += 0.6
  17. elif day_of_week == "Tuesday" or day_of_week == "Thursday" or day_of_week == "Saturday":
  18.     bonus_points += 0.8
  19. elif day_of_week == "Sunday":
  20.     bonus_points += 2
  21.  
  22. print(f'{bonus_points:.2f}')
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement