Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Peter Falcone
Peter Falcone
Courses Plus Student 1,108 Points

odd_even clueless

At this point, I feel like I missed something along the way. I feel like my argument for even_odd() should be different, like it should contain int() of float(), but I tried both and they resulted in syntax errors. Then again, I could have entered them wrong. As for the 'if' line, I simply haven't learned that bit. I was simply guessing.

def even_odd(num):
    if num % 2:

1 Answer

Hey Peter you almost had it.

def even_odd(num):
    if num % 2 == 0:
        return True
        return False