Tell us what’s happening:
Hello may I know why for question 2 in (https://www.freecodecamp.org/learn/python-v9/lecture-booleans-and-conditionals/what-are-truthy-and-falsy-values-and-how-do-boolean-operators-and-short-circuiting-work) the right answer is “False”
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Challenge Information:
Booleans and Conditionals - What Are Truthy and Falsy Values, and How Do Boolean Operators and Short-Circuiting Work?
Maybe you are misunderstanding the option. If you look carefully in the lecture you will notice a difference between how False is written everywhere in lecture part and the option in the question part.
So it should be only False not “False”?
That’s right. False is a Boolean value but "False" is a non-empty string. An empty string is false, but a string with characters is true.
Here are a few falsy values:
None
False
Integer 0
Float 0.0
Empty strings “”
Other values like non-zero numbers, and non-empty strings are truthy.
https://www.geeksforgeeks.org/python/truthy-vs-falsy-values-in-python/
1 Like
Appreciate the comment, so now I know even “ " could mean a different thing!
Absolutely. Space is a character but you can also have an empty string.
"" #empty string
" " #space character
1 Like
ok appreciate it!
, need to be more careful