Remove redundant condition

This commit is contained in:
MstrPikachu
2021-10-03 16:32:15 -04:00
parent daeb9b99f4
commit f142920b3c
+1 -1
View File
@@ -71,7 +71,7 @@ def mystery_2a_no_if(x: int, y: int, z: set[int]) -> bool:
def mystery_2b_no_if(n: int) -> bool:
"""Return the same value as mystery_2b_if, but without using any if statements."""
return (n % 2 == 0 and n % 3 == 1) or (n % 2 == 1 and ((n <= 4 and n < 0) or (n > 4 and n % 3 != 1)))
return (n % 2 == 0 and n % 3 == 1) or (n % 2 == 1 and (n < 0 or (n > 4 and n % 3 != 1)))
def mystery_2c_no_if(c1: int, c2: int, c3: int) -> bool: