We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a9a860 commit bf72113Copy full SHA for bf72113
boolean_algebra/and_gate.py
@@ -29,7 +29,7 @@ def and_gate(input_1: int, input_2: int) -> int:
29
>>> and_gate(1, 1)
30
1
31
"""
32
- return int(input_1 and input_2)
+ return int((input_1, input_2).count(1) == 2)
33
34
35
if __name__ == "__main__":
0 commit comments