Skip to content

Commit 4ca9e04

Browse files
committed
fix: update input length restriction in n_input_nand_gate function to at least 2 elements
1 parent 8ec32ab commit 4ca9e04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

boolean_algebra/nand_gate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def n_input_nand_gate(inputs: list[int]) -> int:
4343
1
4444
"""
4545

46-
if len(inputs) > 2:
47-
raise ValueError("Input list must contain at most two elements")
46+
if len(inputs) > 1:
47+
raise ValueError("Input list must contain at least two elements")
4848

4949
return int(not all(inputs))
5050

0 commit comments

Comments
 (0)