Page 72 - ThinkGPT_V2.1_C7_Flipbook
P. 72

Boolean:  These blocks are used to combine or  invert conditions.  These blocks  represent
                     true/false values and are often used in conditions. They can be used to set or test boolean
                     variables.

                              Block                  Name                            Description


                                                logical and       Return true if both the conditions are true.




                                                logical or        Return true if any of the conditions is true.




                                                logical not       Return true if the condition is false and vice-versa.




                                                boolean true      Set the value as true.



                                                boolean false     Set the value as false.




                  Let us create a project to display a message if a number is positive.



                                                        3  Drag the set to block and drop
                                                       it inside the on start block.




                                                                                                      4  Type 6 in the
                                                                                                     value box of the
                                                                                                     set to block to
                                                                                                     set the value of
                                                                                                     the num variable
                                                                                                     to 6.





                                                                                                     2  Create
                    1  Click on the
                                                                                                     a variable
                    Variables blocks
                                                                                                     named num.
                    category.












                       70    Premium Edition-VII
   67   68   69   70   71   72   73   74   75   76   77