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

Need help with Python Code Challenge "That's Odd"

Basically, I am unable to complete Task 1 of this Code Challenge. Due to a page formatting bug, I can't get additional hints. Help? Thanks!

https://teamtreehouse.com/library/practice-creating-and-using-functions-in-python/practice-functions/thats-odd

1 Answer

Clayton Perszyk
MOD
Clayton Perszyk
Treehouse Moderator 48,723 Points

You need to write a function that returns whether the passed in value is odd. To do so, use the modulo operator (i.e. %) and if the num mod 2 is not 0, then it is odd.