re: Daily Challenge #75 - Set Alarm VIEW POST

FULL DISCUSSION
 

Python with optional typing indicators and tests

def set_alarm(employed: bool, vacation: bool) -> bool:
  return employed and not vacation

assert not set_alarm(True, True)
assert not set_alarm(False, True)
assert not set_alarm(False, False)
assert set_alarm(True, False)

code of conduct - report abuse