Junior — Senior
Determining the oddness of an integer
livecode
Task condition
Simplify the function that checks whether the given number is odd.
def is_odd(n):
if n % 2 == 1:
return True
elif n % 2 == -1:
return True
else:
return False