Header Ads Widget

Ticker

6/recent/ticker-posts

What is boolean data type

In computer science  the boolean data type  is the data type that has one of the two possible values
usually denoted true or false.
Example:-  
                      if(3!=2)
                         printf("Rajnish");
in this example the expression (3!=2) is false So it is boolean .
As in python if we check the type of this expression :-
                                                                                            >>>type(3!=2)
                                                Then the output of this is   >>> <class 'bool'>

Examples:-  1) 3>2
                     2) 3==2 etc.
So an expression which has output true or false are comes under boolean data type.



                      

Post a Comment

0 Comments