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 trialwesley jackson
2,436 Pointseven_odd challenge
When I substitute my return values for print they work fine but once I add the return True/False statements they do not pass. I would appreciate any pointers.
Thank you in advance
WJ
def even_odd(num):
num = int(input("Enter your number:"))
if num % 2 == 0:
return True
else:
return False
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi Wesley,
You just need to take out the line where you're getting user input.
The number will be passed into your function as an argument. You don't need to get a number.
wesley jackson
2,436 Pointswesley jackson
2,436 PointsThank you Jason for your swift response. Works a treat :-)