The if statements for checking whether or not to go to lunch can be rearranged in this way
hungry = False coworkers_going = False brought_lunch = True if brought_lunch and not coworkers_going: print(False) elif coworkers_going and hungry: print(True) elif not brought_lunch and hungry: print(True) else: print(False)