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
jamie Macdiarmid2,048 Points
Can someone show me how its done please?
I think it wouldn't be a bad idea if say after 20 mins of not knowing what to do a solution would be made available with perhaps some cliff notes on it.
What does anyone else think?
if num == (num/2)
Tobias Helmrich31,602 Points
to solve this challenge you have to use the modulo operator (%) which gives you the remainder of a division. If there is no remainder when you divide a number by two it's even and then you have to return True. Otherwise you have to return False as it's not even/odd:
if num % 2 == 0:
And I think that's a good suggestion. However I imagine it a bit hard to implement as it's a bit hard to guess where exactly the student may have problems so I think a forum is a better way as it provides more individual feedback.
I hope that helps! :)
Melanie Villela3,048 Points
Hi Tobias I have a question. Could you put any value to replace (num) like could you type (x) as long you write the same (x) with the if statement?