Page 112 - 2502_Pakistan-kifayat_C-6
P. 112

3.  Check Block Connections: Make sure all blocks are snapped together correctly without gaps or
           missing blocks.

        4.  Look for Logical Errors: Verify your conditions and loops to ensure they do what you want.

        5.  Use the Stop and Start: Stop the script and run it again to see if errors happen consistently.
        6.  Check Variable Values: Display or watch variable values to see if they change as expected.

        7.  Simplify Your Code: Remove or comment out parts of the script to isolate the issue.



                   Timeline


                   Programming constructs are the basic building  blocks or fundamental  concepts used to write
                 computer programs
                   The three main programming constructs are: sequence, selection, and iteration.
                   Events are special blocks that start your script when something happens. They tell the program when
                 to begin running a set of instructions.
                   Conditional Statements let your program make decisions by checking if something is true or false,
                 then running different blocks based on that.
                   Variables are used to store information that can change while your program runs. Think of a variable
                 like a container or box that holds a value, such as a number or text.
                   Debugging is the process of finding and fixing errors or problems (called bugs) in a computer program.
                   Debugging in Scratch means finding and fixing mistakes or problems in your Scratch scripts that stop
                 them from working correctly.






                Choose the correct option.

                1.  Which programming construct allows the computer to repeat a set of instructions?

                         a.  Selection                                 b.  Loop
                         c.  Event                                     d.  Variable

                2.  What is the use of a variable in a program?
                         a.  To display text                           b.  To store information

                         c.  To make choices                           d.  To draw shapes
                3.   In which construct does the program check a condition and perform actions based on whether it's
                   true or false?
                         a.  Sequence                                  b.  Iteration

                         c.  Event                                     d.  Conditional Statement

                4.  Which of the following is a loop block in Scratch?
                         a.  If-then                                   b.  Repeat until
                         c.  When key pressed                          d.  Say block




            110  Premium Edition-VI
   107   108   109   110   111   112   113   114   115   116   117