>>> nor_gate(0, 0) 1 >>> nor_gate(0, 1) 0 >>> nor_gate(1, 0) 0 >>> nor_gate(1, 1) 0 >>> nor_gate(0.0, 0.0) 1 >>> nor_gate(0, -7) 0
(input_1: int, input_2: int)
| 17 | |
| 18 | |
| 19 | def nor_gate(input_1: int, input_2: int) -> int: |
| 20 | """ |
| 21 | >>> nor_gate(0, 0) |
| 22 | 1 |
| 23 | >>> nor_gate(0, 1) |
| 24 | 0 |
| 25 | >>> nor_gate(1, 0) |
| 26 | 0 |
| 27 | >>> nor_gate(1, 1) |
| 28 | 0 |
| 29 | >>> nor_gate(0.0, 0.0) |
| 30 | 1 |
| 31 | >>> nor_gate(0, -7) |
| 32 | 0 |
| 33 | """ |
| 34 | return int(input_1 == input_2 == 0) |
| 35 | |
| 36 | |
| 37 | def truth_table(func: Callable) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected