Skip to content

Commit 83dfbf9

Browse files
authored
Apply batched suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 52e2c86 commit 83dfbf9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

boolean_algebra/and_gate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def and_gate(input_1: int, input_2: int) -> int:
2424
0
2525
>>> and_gate(0, 1)
2626
0
27+
>>> and_gate(1, 0)
28+
0
2729
>>> and_gate(1, 1)
2830
1
2931
>>> and_gate(2, 1)
@@ -50,6 +52,8 @@ def n_input_and_gate(inputs: list[int]) -> int:
5052
"""
5153
Calculate AND of a list of binary input values.
5254
55+
>>> n_input_and_gate([1, 0, 1, 1, 0])
56+
0
5357
>>> n_input_and_gate([1, 1, 1, 1, 1])
5458
1
5559
>>> n_input_and_gate([1, 0, 1, 1, 0])

0 commit comments

Comments
 (0)