Calculate AND of a list of input values >>> n_input_and_gate([1, 0, 1, 1, 0]) 0 >>> n_input_and_gate([1, 1, 1, 1, 1]) 1
(inputs: list[int])
| 33 | |
| 34 | |
| 35 | def n_input_and_gate(inputs: list[int]) -> int: |
| 36 | """ |
| 37 | Calculate AND of a list of input values |
| 38 | |
| 39 | >>> n_input_and_gate([1, 0, 1, 1, 0]) |
| 40 | 0 |
| 41 | >>> n_input_and_gate([1, 1, 1, 1, 1]) |
| 42 | 1 |
| 43 | """ |
| 44 | return int(all(inputs)) |
| 45 | |
| 46 | |
| 47 | if __name__ == "__main__": |
nothing calls this directly
no outgoing calls
no test coverage detected