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 trialvictor E
19,146 PointsI have gotten this far thanks to your help. but I still show an error message
yup
def even_odd(num):
for number in num:
if num % 2 == 0:
True
else:
False
1 Answer
Steve Hunter
57,712 PointsHi there,
Your code is fine - just remove the for
loop as there's nothing to loop over num
is just a number. Your testing is correct so remove the second line, fix your indents and return
the True
and False
then you're good to go!
Steve.
victor E
19,146 Pointsvictor E
19,146 PointsThank you Steve Hunter! much appreciated for your help!
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsNo problem!