Page 84 - Touchcode_C7_Flipbook
P. 84

Well done, by now you have learned to build a calculator!






                        At a Glance

                        A computer program is a set of instructions which is given to a computer to execute.

                        A programming language is a tool which is used to write instructions for computers to follow.
                        Computers can only understand binary strings of 1s and 0s.
                        Sorting is arranging numbers/ elements either in ascending order or in descending order.

                        Variables are used to store values.
                        Whenever a variable is created, Python assigns a space to it so that its value can be stored
                        till the program runs.
                        String, integer/floats and Boolean are the three basic data types in Python.







                       Exercise

                  A.  Tick ( ) the correct option.

                      1.  Which of the following data type access character in a string by using its position?
                          a.  Integer                                   b.  Float

                          c.  String                                    d.  Boolean

                      2.  Which of the following operator is used to join the strings together?
                          a.  +                                         b.  ++

                          c.  +++                                       d.  +=








                   82     Touchcode-VII
   79   80   81   82   83   84   85   86   87   88   89