DEV Community

Discussion on: Daily Challenge #75 - Set Alarm

Collapse
 
thejessleigh profile image
jess unrein • Edited

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)