Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 139 - 2632_CodeMind
P. 139

    Factopedia                            Research shows coding activates brain areas tied to memory,
                                                                                  Tech Fact

                                                                 attention, and language, boosting learning.

                                                             Let’s CatCh uP

                         Algorithms are often          1.   Which construct  allows a program to  execute  a block  of code
                          evaluated based on              repeatedly as long as a certain condition is met?
                         their time complexity                  a. Variable assignment                    b. Loop
                          (measured in Big O           2.  What is the result when using the "AND" condition in a program?
                          notation) and space                   a. True only if both conditions are true
                              complexity.
                                                                b. True if either of the conditions is true
                                                       3.  What type of loop repeats a certain number of times?

                                                                a. Conditional loop                       b. Counting loop
                                                       4. Conditional loops in a program repeat until:
                                                                a. A fixed number of times

                                                                b. A certain condition is reached

                           One of the oldest
                           known algorithms
                            is the Euclidean
                           algorithm, which                    Let’s BaCk-uP
                             dates back to
                            ancient Greece                  Conditional statements are used in a program to instruct the
                            around 300 BC.                computer to make a decision.

                                                            A loop allows a set of instructions or a block of code to be
                                                          executed repeatedly.
                                                            When a loop repeats forever (endlessly), it is called an infinite
                                                          loop.

                            Algorithms help
                         Google find the most
                          relevant results for
                          your search query.

                      138   Premium Edition-VIII

| 134 135 136 137 138 139 140 141 142 143 144 |