Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 137 - 2609_Logiccode
P. 137

    e.  Define the following:

                           (i)  Float data type
                              __________________________________________________________________________________

                           (ii)  Boolean data type

                              __________________________________________________________________________________

                        f.  Distinguish between the following with the help of examples.

                           (i)  AND operator and OR operator

                              __________________________________________________________________________________

                           (ii) Modulus operator and Division operator

                              __________________________________________________________________________________

                        g.  What is decision making statement?

                          ______________________________________________________________________________________

                          ______________________________________________________________________________________

                                                                                                    21 st
                     5.  Competency-based/Application-based questions.                           Century   #Information Literacy
                                                                                                   Skills
                        a.   Shweta  was writing  a  program  in  which she  wanted  to  execute  a  particular  set  of statements
                          depending upon a particular test condition. Which type of statements can she use for this?
                        b.   Radhika is creating a Python program to store the number of students present in her class. She does
                          not need decimal values and wants to perform addition and subtraction operations on this number.
                          Which data type should she use?

                        c.   While checking whether a student has passed or failed, Neha’s program returns either True or False
                          based on marks. Which data type is being used here and what values does it return internally?

                        d.   Karan writes  a  Python  program  and  adds  some  lines  starting  with  the  # symbol  to  explain  the
                          code. These lines do not affect program execution. What are these lines called, and why are they
                          important?
                        e.   Priya writes an expression 10 + 5 * 2 in her Python program and notices that multiplication happens
                          before addition. Which concept controls this order of execution?

                               SDG Activity

                        Conduct a survey to identify male-to-female ratios among teaching staff, students, and
                        housekeeping staff at your school. Use Python to analyse the data and display result.
                        Then, suggest three different ways to promote gender equality in your school based on
                        your findings.

                                                                                                      More on Python  135

| 132 133 134 135 136 137 138 139 140 141 142 |