Skip to content

Commit bf72113

Browse files
author
Saksham Chawla
authored
Update and_gate.py
1 parent 0a9a860 commit bf72113

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boolean_algebra/and_gate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def and_gate(input_1: int, input_2: int) -> int:
2929
>>> and_gate(1, 1)
3030
1
3131
"""
32-
return int(input_1 and input_2)
32+
return int((input_1, input_2).count(1) == 2)
3333

3434

3535
if __name__ == "__main__":

0 commit comments

Comments
 (0)