Python Python Basics (2015) Number Game App Even or Odd

victor escarcega
victor escarcega
5,439 Points

I have gotten this far thanks to your help. but I still show an error message

yup

even.py
def even_odd(num):
    for number in num:
        if num % 2 == 0:
            True
        else:
            False

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 57,551 Points

Hi there,

Your code is fine - just remove the for loop as there's nothing to loop over num is just a number. Your testing is correct so remove the second line, fix your indents and return the True and False then you're good to go!

Steve.