Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false. NOTE: I am not looking for the answer — I just want to know why the syntax is wrong (: I’m really trying to do this on my own. Thanks for your assistance.
def bool_to_word(boolean):
if (boolean === true) {
return "Yes";
} else if (boolean === false) {
return "No";
}
Traceback (most recent call last):
File "/workspace/default/tests.py", line 2, in <module>
from solution import bool_to_word
File "/workspace/default/solution.py", line 2
if (boolean === true) {
^
SyntaxError: invalid syntax