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 trialPeter Falcone
Courses Plus Student 1,108 Pointsodd_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:
return(True)
else:
return(False)
1 Answer
bronsonroybal
16,715 PointsHey Peter you almost had it.
def even_odd(num):
if num % 2 == 0:
return True
else:
return False
Peter Falcone
Courses Plus Student 1,108 PointsPeter Falcone
Courses Plus Student 1,108 Pointsthanks a ton