not sure what I'm missing (again)
1) made the function even_odd with number as it's argument 2) defined number so the value would equal either 0 (even) or 1 (odd) 3) created an if loop that returned True for 0 and False for 1 4) called the function - I'm still not clear when I should be doing this and when I shouldn't - some of the code in the tasks and videos have done it both ways in different situations and I'm not sure what determines its necessity.
def even_odd(number): number = int(5) % 2 if number == 0: return True else: return False even_odd(5)
Todd Anderson4,260 Points
For this challenge you can pass your argument into a conditional instead of creating a new variable. Also in python you don't need to specify that a number is an int, it will figure that out when the code is run. Try this.
def even_odd(nums): if nums % 2 == 0: return True else: return False