Page 121 - Touchpad_Plus_V3.2_Class 6
P. 121

E.   Long answer type questions.

                    1.  List the relational operators used in Python with the help of an example.

                       .....................................................................................................................................................................................
                       .....................................................................................................................................................................................

                       .....................................................................................................................................................................................

                    2.   What is the use of comments in programming? How many types of comments are there in Python?

                       .....................................................................................................................................................................................

                       .....................................................................................................................................................................................

                       .....................................................................................................................................................................................
                    3.  Define modes of Python IDLE.

                       .....................................................................................................................................................................................

                       .....................................................................................................................................................................................

                       .....................................................................................................................................................................................


                                                       Mind Boggler




                                                                                                 21 st
                 A.  Competency-based/Application-based questions.                             Century   #Information Literacy
                                                                                                 Skills
                    1.  Lara has taken two numbers as input by using the following statements:
                       x = input("Enter the first number")

                       y = input("Enter the second number")
                       But when she tries to perform the addition operation, she gets a concatenation of
                       numbers. Why is she not getting the correct output?

                    2.  Jiva is working on a scientific research project in which she has to calculate the population growth
                       of the bacteria over multiple time intervals. The population of the bacteria doubles every hour
                       under ideal conditions. Which python operator should she use to get the desired result?


                 B.  What will be the output of the following programs?                             21 st
                                                                                                 Century   #Critical Thinking
                                                                                                   Skills
                     1.   a = 4.5
                          b = 2
                          print (a//b)


                     2.  y = 10
                          x = y + 2
                          print(x)




                                                                                         Introduction to Python      119
   116   117   118   119   120   121   122   123   124   125   126