Calculate XOR of the input values >>> xnor_gate(0, 0) 1 >>> xnor_gate(0, 1) 0 >>> xnor_gate(1, 0) 0 >>> xnor_gate(1, 1) 1
(input_1: int, input_2: int)
| 17 | |
| 18 | |
| 19 | def xnor_gate(input_1: int, input_2: int) -> int: |
| 20 | """ |
| 21 | Calculate XOR of the input values |
| 22 | >>> xnor_gate(0, 0) |
| 23 | 1 |
| 24 | >>> xnor_gate(0, 1) |
| 25 | 0 |
| 26 | >>> xnor_gate(1, 0) |
| 27 | 0 |
| 28 | >>> xnor_gate(1, 1) |
| 29 | 1 |
| 30 | """ |
| 31 | return 1 if input_1 == input_2 else 0 |
| 32 | |
| 33 | |
| 34 | if __name__ == "__main__": |
nothing calls this directly
no outgoing calls
no test coverage detected