a xor gate is a logic gate in boolean algebra which results to 1 true if only one of the two inputs is 1 and 0 false if an even number of inputs are 1 following is the truth table of a xor gate input 1 input 2 output 0 0 0 0 1 1 1 0 1 1 1 0 refer https www geeksforgeeks orglogicgatesinpython calculate xor of the input values xorgate0 0 0 xorgate0 1 1 xorgate1 0 1 xorgate1 1 0 calculate xor of the input values xor_gate 0 0 0 xor_gate 0 1 1 xor_gate 1 0 1 xor_gate 1 1 0
def xor_gate(input_1: int, input_2: int) -> int:
    
    return (input_1, input_2).count(0) % 2


if __name__ == "__main__":
    import doctest

    doctest.testmod()