+ 3
Is boolean is a data type
boolean return only 0 and 1
8 Antworten
+ 17
in java , only true or false
//no 0 or 1
+ 3
in c++
+ 3
yes , Boolean is a data type in python .
Boolean have a class which is
<class 'bool'>
the bool is gives two value "True" either "False"
if any thing is "n" then it's return the True .
and it return False if only the value is "0" or False
True =1
False=0
for example:
s="hello world"
str_= bool(s)
>>>True
+ 1
Depends. In what language?
+ 1
It returns 0 and 1 or True and False or Yes and No.
+ 1
I think you are right Sunnel Singh
0
In C, boolean is indeed a data type.
0
在java中,boolean的位长为1,取值范围为true,false, default value is false.