Page 126 - 2611_SmartGPT Pro V(5.0) C-5
P. 126

5.   Lists Blocks: These blocks help you store and manage collections of items. You can
                      add, remove or find items in a list. Example:



                             Blocks                                          Functions





                             create empty list    Creates an empty list with no element.


                                                  Returns the number of items in the list.
                           length of list  list



                  6.  Dictionaries Blocks: These blocks store data in key-value pairs. They help you organise
                      and access information using labels. Example:



                             Blocks                                          Functions



                                                   This block  creates  a dictionary  without  any  key-value
                          create empty dictionary
                                                  pairs.
                                                  This block removes the key-value mapping in the dictionary
                          remove entry for key
                                                  for the given key.
                             from dictionary


                  7.  Colors Blocks: These blocks allow you to pick and use colours in your app. You can set
                      background colours or text colours using these. Example:



                             Blocks                                          Functions



                                                  This basic colour block is a small square block that shows a

                                                  specific colour in the middle, representing the colour stored
                                                  inside it.


                       make color  make a list  255  This block takes in a list of 3 or 4 numbers. These numbers in
                                           0
                                           0      this list represent values in an RGB code.


                  8.  Variables Blocks: These blocks store values that can change while the app runs. You
                      can create, set and get variable values. Example:










                  124   Computer Science (V5.0)-V
   121   122   123   124   125   126   127   128   129   130   131