a nand gate is a logic gate in boolean algebra which results to 0 false if both the inputs are 1 and 1 true otherwise it s similar to adding a not gate along with an and gate following is the truth table of a nand gate input 1 input 2 output 0 0 1 0 1 1 1 0 1 1 1 0 refer https www geeksforgeeks orglogicgatesinpython calculate nand of the input values nandgate0 0 1 nandgate0 1 1 nandgate1 0 1 nandgate1 1 0 calculate nand of the input values nand_gate 0 0 1 nand_gate 0 1 1 nand_gate 1 0 1 nand_gate 1 1 0
def nand_gate(input_1: int, input_2: int) -> int:
    
    return int(not (input_1 and input_2))


if __name__ == "__main__":
    import doctest

    doctest.testmod()