diff --git a/boolean_algebra/not_gate.py b/boolean_algebra/not_gate.py index cfa74cf42204..ba56c3b38e05 100644 --- a/boolean_algebra/not_gate.py +++ b/boolean_algebra/not_gate.py @@ -21,7 +21,7 @@ def not_gate(input_1: int) -> int: 0 """ - return 1 if input_1 == 0 else 0 + return int(not bool(input_1)) if __name__ == "__main__":