Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 97 - 2607_Trackpad_Pro_5.1_flipbook_C7
P. 97

    3.  Think and answer.
                         a.  What do you mean by a data type?
                          ______________________________________________________________________________________

                         b.  What will be the output of the following statement?
                          print('10' + '15')
                          ______________________________________________________________________________________
                         c.  If a = 6, b = 8 then what will be the final value of variable a after executing the following statement?

                            a+=a+b//2
                          ______________________________________________________________________________________

                         d.  Which operator is used to assign a value to a variable?
                          ______________________________________________________________________________________

                         e.  What are the errors? Explain the types of errors with examples.
                          ______________________________________________________________________________________

                          ______________________________________________________________________________________
                         f.  Explain any one assignment operator with an example other than = operator.

                          ______________________________________________________________________________________
                          ______________________________________________________________________________________

                      4.  What will be the output of the following expressions in Python?
                         a.  15 – (2*4)     ______________         b.  (14 + 4) /9       ______________
                         c.  5 < 10 and 5 > 6   ______________     d.  23 – 2.5 >= 5 * 4   ______________

                      5.  Competency-based/Application-based questions.                                   Experiential Learning
                         a.   Simran is creating a Python program for her school maths project. She wants to create a relation
                            chart between various data types. What type of operators should she use?
                          ______________________________________________________________________________________

                         b.   Anaya works as a programmer in an organisation where she has written the Python code. In that code,
                            she skipped the closing parenthesis with the print function. Which type of error occurred in her code?

                          ______________________________________________________________________________________

                          LAB ACTIVITY                                                                       Interdisciplinary

                           Visit your computer lab and perform the following actions:
                                Write a program to enter two numbers and print their difference.
                                Write a program to calculate the area of a triangle.
                                Write a program to calculate average of 6 numbers.
                               Write a program to convert kilometres into centimetres.
                               Write a program to convert minutes into seconds.
                               Write a program to find cube of a number '4'.
                                Write a program to calculate the Simple Interest where, Principal = 1000, Rate = 10% and
                              Time = 4 Years. Use SI = (Principal * Rate * Time)/100 formula to calculate the simple interest.
                               Write a program to find perimeter of square whose side is 4 cm.

                       96   Premium Edition-VII

| 92 93 94 95 96 97 98 99 100 101 102 |