+ 1

What is the meaning of boolean

Can I know what is the meaning

20th Jul 2021, 2:11 AM
Ankita
3 odpowiedzi
+ 4
Hello Ankita Boolean is nothing but a data type whose value can be true or false, we use boolean in conditions, function which checks or variable which tells yes or know, For example, isPrime = True isAnimal = False isPass = False def isDivisibleByTwo(num): return num%2==0 if True: print('It's true') else: print('False')
20th Jul 2021, 6:47 AM
Abhiyantā
Abhiyantā - avatar
+ 2
A boolean is a value, i.e a binary variable that can have one of two possible values, 0 or 1. Zero denotes false and One denotes true.
20th Jul 2021, 2:53 AM
Mufungo Geeks
Mufungo Geeks - avatar
+ 2
Ankita Kumari You have already been given some excellent answers, but I would like to try to explain in a non coding way. We all turn things on & off. Lights, TV, computer, etc..... If your light is on, it exists, therefore it is true. 1 light on is true If your light is off, it does not exist, therefore it is false. 0 lights are on.
20th Jul 2021, 10:33 AM
Rik Wittkopp
Rik Wittkopp - avatar