Page 302 - Computer Science Class 11 With Functions
P. 302
Assertion and Reasoning Based Questions
The following questions are assertion(A) and reasoning(R) based. Mark the correct choice as
a. Both A and R are true and R is the correct explanation of A
b. Both A and R are true and R is not the correct explanation of A
c. A is true but R is false
d. A is false but R is true
1. Assertion(A): A module is a collection of functions.
Reasoning(R): A function is a sequence of instructions to perform a specific task.
2. Assertion(A): In a function definition, default parameters should be given after non-default parameters.
Reasoning(R): When the values of default parameters are specified in a function call, the default values provided in the
function definition are ignored.
3. Assertion(A): Functions can also be passed as arguments.
Reasoning(R): A function argument may be an object of any type in Python.
Case Based Questions
1. Shikha is a computer programmer in an IT firm. Her company is organizing a Christmas carnival. One of the highlights of
the carnival is the lucky draw. She has been assigned the task of writing a program in Python that would randomly pick up
numbers from the given range for the lucky draw. Help her complete the task.
2. Rimjhim has recently studied statistics in class. Her maths teacher explained the concepts such as mean, median, and mode.
In the computer class, her teacher explained various functions of the statistics module that may be used for computing
these measures. To keep track of the pocket money of students studying in class, she decides to write a program that will
store the pocket money of students in the form of a list. Thereafter, using functions from the statistics module, she will
display the following output:
a. Average pocket money of the students of her class.
b. The median of the given data.
c. The amount of pocket money that is most common in the given data.
Multiple Choice Questions
1. (c) 2. (a) 3. (c) 4. (a) 5. (a) 6. (c) 7. (a)
True or False
1. (T) 2. (T) 3. (F) 4. (T) 5. (F)
Fill in the blanks
1. random 2. math 3. keyword arguments 4. default 5. statistics
300 Touchpad Computer Science-XI

