Page 70 - Touchcode_C5_Flipbook
P. 70

CHALLENGE                                    4






                                                           CODING BUZZ


                  Look at the rectangle and the program below. What will be the output?
























                    1.   Draw a square inside the four corners of the rectangle
                    2.   Repeat 4 times for each square

                         {

                         Write different even numbers in the square

                         Draw diagonals of the square

                         }

                    3.   Put an X in the center of the rectangle
                    4.   Draw a triangle outside the X

                    5.   Draw a bigger triangle outside the first triangle
                    6.   Considering X as center, draw a circle outside the second triangle
                    7.   If (the circle touches any square) AND (sum of all numbers in square > 20)


                         Then

                               Color the outer triangle
                         ELSE

                               Color the inner triangle
                    8.   Write your full name below the rectangle
   65   66   67   68   69   70   71   72   73   74   75