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 trialDidier Borel
2,837 Pointseven_odd return true or false
I can't seem to figure this one out, why is it wrong, what is the correct answer? this
even_odd(num)
if num % 2==int:
return(True)
else:
return(False)
1 Answer
Antonio De Rose
20,885 Pointseven_odd(num) #you are missing the keyword, on how to define a function, missing the ending colon
if num % 2==int: #you are missing the indentation, then you should not be checking the result with an int
return(True)
else:
return(False)