I am having trouble with my syntax around if statements and conditionals. I am trying to write a function which returns what time to set an alarm clock to depending on two parameters, what day it is and whether the person is on vacation or not. My days are encoded as 0 = Sunday, 1 = Monday ... 6 = Saturday. The function needs to return '7:00' for weekdays while not on vacation, '10:00' during weekdays on vacation and weekends while not on vacation, and finally return 'off' on weekends not on vacation. So far I have the following code but it gives me '10:00' when I call the function with print(alarm_clock(0, True)) when it is supposed to output 'off' instead. Any help appreciated. Thanks
def alarm_clock(day, on_vacation):
"""Alarm clock function"""
if (int(day) < 6 and int(day) != 0) and not on_vacation:
return('7:00')
elif (int(day) == 6 or int(day) == 0) and not on_vacation:
return('10:00')
elif (int(day) < 6 or int(day) != 0) and on_vacation:
return('10:00')
elif (int(day) == 6 or int(day) == 0) and on_vacation:
return('off')