gurinder singhPro Student 723 Points
where is the error??
def even_odd(num): num = int(input("give me a num: ")) if num % 2 == 0: return True else: return False
Steven Parker94,464 Points
The argument is passed in to the function, so you should not ask for input (the second line should not be there).
AJ SalmonPro Student 4,496 Points
You don't need to use
input for this one. The argument to the function will be a number, and it's passed to the function when it's called. For example, if I wanted to see if the number 20 was even or odd using our function, I would call it like this:
>>> even_odd(20) True
It returns True because the number we put in the parentheses is even. When you're writing the function, you don't know what number will be passed to it, so you give it a placeholder.
num is just a placeholder that represents future arguments to the function. All you need to do in this case is delete line two. Hopefully, this clears it up a bit! Happy coding :)