Page 44 - Code & Click - 7
P. 44

3.  Differentiate between:
                    (a)  Division operator and Modulus operator

                    (b)  Division operator and Floor division operator

                    (c)  The Arithmetic + operator and the String + operator
                4.  Explain the three Logical operators in Python with an example of each.
                                                                                                  Computational Skills
             Mind Stretching
              1.  Evaluate and write the output of the following Python statements:
                   (a) (True and False) or (True and True)

                   (b) print(“Hello” * 3)
                   (c) print(“the result of 26//4 is ”, 26 // 4)
                   (d) 80 – (25 / 5 * 10 + (3 ** 3))
              2.  Write the output of the following code segments in Python:

                   (a)  X = 20

                      X *= 10
                      print(X)
                  (b)  num1 = 20

                      num2 = 30
                      num3 = 40
                      print(num1 + num2 + num3 / 4)



                                                                                                  Computational Skills
             Lab Work

             Write the following programs in Python:
               (a)  Program to accept the length and breadth of a rectangle from the user and display its area and
                    perimeter.

               (b)  Program to accept distance from the user in metres and convert it into kilometres and metres.
               (c)  Program to accept three numbers from the user and display their sum and product.


























            42
   39   40   41   42   43   44   45   46   47   48   49