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 Python Basics (2015) Logic in Python Booleans

how do I right a falsey variable?

help

booleans.py
right= bool('Dogs have paws')
wrong= bool("Dogs don't have paws")

1 Answer

Strings and and number other than zero are always truthy. This means both your "right" and "wrong" variables are truthy, which is bad (not bad for the right variable, but this wouldn't pass because wrong has to be falsey). Both zero and None are falsey. Lastly, the challenge didn't ask you to transform the value into a "bool", didn't it? So try getting rid of that :) this code should work:

right = "A string, which is truthy"
wrong = 0

Hope this helps! ~Alex :smile: