Page 100 - CG_v2.1_flipBooks_class_6
P. 100

In mobile apps, the events that happen are the results of the user doing something (on a click of
                     button the orientation of the phone screen changes)
                  What are Event Handlers?

                  Event handler is a block of code which get executed when the event occurs and it is associated with
                  the event.
                  Examples of Event Handlers:

                      In Makecode Arcade, you display message by using ‘splash’ block . ‘splash’ block will get execute
                     when you click on ‘start the simulator’ button. In this ‘start the simulator’ button is an event handler.

                     When you click “send” for a text message, it sends the message and makes a sound.
                     When you purchase an app from an app store, the phone asks for a password.
                     When you click an icon for an app, the app opens.


                                                                                   Information Literacy
                         Quest                                                     Technology Literacy



                       Give one word answer to the following questions.
                       1.   What is an action that triggers a response in programming?

                       2.  What is the term for a block of code that executes when a specific
                           event occurs?





                         Let's REFRESH


                        Traffic lights contain sensors that are programmed to calculate how many cars or pedestrians are
                       present at a specific point.
                        Coding or programming, is the process of creating codes to instruct a computer to perform a specific
                       task.
                        To interact with computers, you need a language that the computer understands, which is called a
                       programming language.

                        A dictionary is a book that contains words and phrases in alphabetical order with their meanings.
                        Pseudocode is used to describe the steps of an algorithm in a human-understandable language.
                        MakeCode Arcade is a free, open-source, online integrated development environment (IDE) for game
                       production.
                        Block Toolbox, Programming Workspace, Game Simulator, Game Controls, etc. are some components
                       of the Makecode Arcade Window.

                        Sprites blocks, controller blocks, game blocks, etc. are types of blocks category.
                        We can add a sprite using the given two options: creating a new sprite using the image editor or using
                       a built-in sprite from Gallery.

                        Block-based coding uses a drag and drop approach.





                       98    Computer Genius (V2.1)-VI
   95   96   97   98   99   100   101   102   103   104   105