+ 2
How to properly return a boolean
if (x == true){ return true; }else if (x==false){ return false; }
7 Respostas
+ 1
that code up will not work because thee is no : after if
0
I think we shouldn not use else if , an else should do the job where only two conditions
else
return false
0
I guess the question is syntax independent
0
i think it works in c language but not in python
0
and the question even is not so clear to help
0
before writing that first we need to declare what x is
0
e = 0
print('0') if not e else print('true')