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

What is going wrong in this Python's Basic challenge?

https://imgur.com/epYJtiv

Above is the link to my code + the prompt and my error message. When replace return with "print" in my own workspace, it returns the correct True/False messages (although it never returns anything if I just do return - what's going on there?). I've gone through all the hints but it does not address this. Thanks for the help.

1 Answer

Steven Parker
Steven Parker
231,271 Points

The function needs to return the Boolean values of True or False (no quotes) instead of strings with the words "True" and "False".

By just removing the quotes, I still can't get this function to work. I have also replaced the True and False statements with return bool(1) and return bool(0), respectively, but that also does not work.

Steven Parker
Steven Parker
231,271 Points

It should pass the challenge after removing the quotes.

It works now, not sure what I did wrong the first time. Thanks!