Page 44 - RoboGenius Pro C4
P. 44

2.  Choose the option that represents a visual way of coding.
                                                                                                                                            COMPETENCY-BASED QUESTIONS
                                (i)  Text-based Programming                (ii)  Block-based Programming
                                                                                                                                            1.  Raj is building a program where he needs to keep track of the number of times a button
                                (iii)  Python                              (iv)  JavaScript                                                     is pressed. He decides to use a variable to store and update this count. Which blocks
                                                                                                                                                should Raj use to create and update the variable?
                     3.  Spot the block that helps in iterating over each item in a list or array.
                                                                                                                                            2.  Ananya wants to display a cold icon if the temperature is below 10°C and a hot icon if
                                (i)  for block                             (ii)  repeat block
                                                                                                                                                it’s above 25°C. Which logic block should she use?

                                (iii)  forever block                       (iv)  for element block

                     4.  Identify the block used for repeating a set of actions a specific number of times.

                                (i)  repeat block                          (ii)  forever block


                                (iii)  on start block                      (iv)  if block

                     5.  Choose the block that is used to create a new variable.

                                (i)  show number block                     (ii)  Make a Variable

                                (iii)  on start block                      (iv)  show string block


                  B.  Write ‘T’ for true and ‘F’ for false.


                     1.   In Text based coding you can view and edit your code.
                     2.   Block-based programming is more flexible and powerful, allowing you

                         to create complex programs.

                     3.  Workspace is an area, you can drag and drop blocks to create your program.


                     4.  Loop blocks allow you to repeat actions multiple times.

                     5.   Comparision block compares if two values are equal, less than or

                         grater than the second value.

                  C.  Fill in the blanks using the given hints:
                     1.                  button allows you to download your code to the                   Hints
                         micro:bit device.

                     2.                  block displays a text message on the screen.                  Information
                     3.  You can see your project directly within                     editor.           Download
                     4.                  programming  gives  you instant  results as you               Live preview
                         build your projects.                                                          Show string

                     5.  Variables are like labelled boxes that store                    .             Block-based






                                 RoboGenius Pro - IV
                 42
   39   40   41   42   43   44   45   46   47   48   49