Page 87 - Dig_CodeAI_V2.1_Class_5
P. 87

The Sprite will ask you to type your favourite fruit. When you press the Enter key, the name
                 of the fruit appears in the speech bubble of the penguin. The name of the fruit then appears

                 in the answer as well as in the variable name on the stage.

























                 Conditional Blocks

                 Many times, you have to do a task which is dependent on some condition. For example, you
                 have to make mango shake. There are two conditions:

                 a.   Go to the refrigerator and check if there are mangoes. If mangoes are there, then you
                    will make mango shake.
                 b.   If the mangoes are not there, you will make cold coffee.

                 Here the condition is the availability of mango.





                                                                           Advanced Blocks & Game Creation    85
   82   83   84   85   86   87   88   89   90   91   92