Calculate AND of the input values >>> and_gate(0, 0) 0 >>> and_gate(0, 1) 0 >>> and_gate(1, 0) 0 >>> and_gate(1, 1) 1
(input_1: int, input_2: int)
| 17 | |
| 18 | |
| 19 | def and_gate(input_1: int, input_2: int) -> int: |
| 20 | """ |
| 21 | Calculate AND of the input values |
| 22 | |
| 23 | >>> and_gate(0, 0) |
| 24 | 0 |
| 25 | >>> and_gate(0, 1) |
| 26 | 0 |
| 27 | >>> and_gate(1, 0) |
| 28 | 0 |
| 29 | >>> and_gate(1, 1) |
| 30 | 1 |
| 31 | """ |
| 32 | return int(input_1 and input_2) |
| 33 | |
| 34 | |
| 35 | def n_input_and_gate(inputs: list[int]) -> int: |
nothing calls this directly
no outgoing calls
no test coverage detected