Page 131 - TechPluse_C7_Flipbook
P. 131

D.    Short answer type questions.

                       1.   What do you mean by expression ‘a = 8’?
                            ...........................................................................................................................................................................

                       2.    What is the use of variables in Python.
                            ...........................................................................................................................................................................

                       3.    Define the term data types.
                            ...........................................................................................................................................................................

                       4.    What is operator precedence?
                            ...........................................................................................................................................................................

                       5.    What does IDLE stand for?
                            ...........................................................................................................................................................................
                 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



                      What will be the output of the following programs?                           Computational Thinking

                       1.  a = 4.5                                     4.  var1 = 1
                           b = 2                                           var2 = 2
                           print (a//b)                                    var3 = 3
                       2.  y = 10                                          print(var1 + var2 + var3)
                           x = y + 2                                   5.  a = 4
                           print(x)                                        b = 11
                       3.  p, q, r = 10, 20 ,30                            print(a or b)
                           print(p, q, r)                                  print(a > 2)

                  Lab Session                                                                          Interdisciplinary



                  Write a program to:
                  1.  convert Celsius to Fahrenheit using the formula:  (Celsius * 1.8) + 32
                  2.  convert kilometre unit to metre.
                  3.  input five names from the user.
                  4.  calculate the area of a square.


                 Teacher's Note

                   1.  Discuss about Python programming modes with the students.
                   2.  Go through all the other topics covered in this chapter.
                   3.  Tell to the students about the importance of Python.


                                                                                         Introduction to Python      129
   126   127   128   129   130   131   132   133   134   135   136