Page 139 - Trackpad_V4.0_c6_Flpbook
P. 139

4.   Ridhima performed a division operation in Python by dividing 35 by 2, resulting in 17.5. However, she
                           prefers not to display the fractional part. Which operator would you recommend to help her achieve
                           the desired outcome?
                                  a. **                                         b. //


                                  c. %                                         d. /
                        5.  Which of the following operator will execute first according to the Python operator precedence?
                                  a. +                                          b. //


                                  c. **                                         d. >=

                         Tick ( ) the correct statements and cross ( ) the wrong ones.


                        1.  Python is a low-level programming language.

                        2.  IDLE stands for Integrated Development and Learning Environment.

                        3.  In the Interactive Mode, commands entered by the user are not saved.

                        4.  We cannot convert a value into an integer in Python.


                        5.  The names given to the variables are known as identifiers.

                        Fill in the blanks with the correct words.



                                               Hints  Variables, 9, Comments, True, Precedence


                        1.  If a = 5, then print(a + 4) will give the result      .
                        2.                 are memory reference points.
                        3.                 enable us to understand the way a program works.

                        4.                 of operators determines the order in which the operators are executed.
                        5.  The AND operator results true if both operands are            .



                  Q     Answer the following questions:
                    A
                        1.  Romi has written the following command on the Python shell:

                           (10 < -15) and (2 < 10)
                            What will he get as an output?






                        2.   What is the use of the greater than or equal to operator? Which category of operators does it belong to?










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