Page 137 - Computer Genius Class 07
P. 137

Computational Thinking
                       Quest                                                           Information Literacy


                      Write the output for the following:



                      1.






                      2.








                       Let's REFRESH

                   l   With block code, one can learn the programming logic and design better.

                   l   Text-based coding involves writing lines of code.
                   l   Syntax is like the grammar and spelling rules of a programming language.
                   l   Variables are containers for storing data values.
                   l   Print command can be used to provide the information anywhere in the code.
                   l   Every value needs to be assigned to a specific data type to make the variable more readable by a
                      computer.


                                                       Exercise





                 A.  Tick ( ) the correct option.
                    1.   The ______________ function prints the specified message to the screen.

                        (i)   input()                                        (ii)  print()

                       (iii)   output()                                     (iv)   int()

                    2.   Which of the following is the type of data type in Python?

                        (i)  Integer                                         (ii)   Float

                       (iii)  Boolean                                       (iv)  All of these

                    3.   Which of the following operator is used to calculate remainder of the division of left operand by the
                        right?
                        (i)   +                                              (ii)   /

                       (iii)   %                                            (iv)   **



                                                                                             Textual Coding   135
   132   133   134   135   136   137   138   139   140   141   142