Page 87 - 2619_PlusGPT V2.1_C-8
P. 87

(ii)  Single-line comment and Multiple-line comment


                           _____________________________________________________________________________________

                           _____________________________________________________________________________________


                                                                                       fun Zone




                   Let's soLve                                                                         Critical Thinking
                     What will be the output of the following programs?

                    1.  a = 4.5                            2.  p, q, r = 10, 20 ,30
                       b = 2                                  print(p, q, r)

                       print(a//b)
                    3.  var1 = 1                           4.  a, b = 7, 25

                       var2 = 2                                c = b - a
                       var3 = 3                               print(c)

                       print(var1 + var2 + var3)

                                                                                                  Computational Thinking

                   Let's exPLore

                     Surf the Internet and find information about operators precedence.



                     teCh PraCtiCe                                                                Computational Thinking


                   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.

                   5.  Add two numbers.




                                                        For The Teacher


                       Discuss about the components of Python Editor window with the students.
                       Go through all the topics covered in this chapter.
                       Tell the students about the importance of Python.






                                                                                             Introduction to Python  85
   82   83   84   85   86   87   88   89   90   91   92