Vacation Alarm
An alarm depends on the day of the week and whether you are on vacation: weekdays ring earlier, while weekends let you sleep in. Write a function alarm_clock where day is a number from 0 to 6: 0 is Sunday and 6 is Saturday. Without vacation, return 7:00 on weekdays and 10:00 on weekends; on vacation, return 10:00 on weekdays and off on weekends.
Примеры
Ввод
1, FalseВывод
"7:00"Ввод
5, FalseВывод
"7:00"Ввод
0, FalseВывод
"10:00"Нужно реализовать
def alarm_clock(day: int, vacation: bool) -> str:
Теги
strings
Prijavite se za ogled zgodovine oddaj
PrijavaPrijavite se za uporabo mentorja UI
PrijavaVisible tests
1
Input
1, FalseExpected
"7:00"2
Input
5, FalseExpected
"7:00"3
Input
0, FalseExpected
"10:00"4
Input
6, FalseExpected
"10:00"5
Input
1, TrueExpected
"10:00"6
Input
0, TrueExpected
"off"Focus radio
Paused · SomaFM · Fluid