Page 257 - Computer Science Class 11 Without Functions
P. 257
3. In each of the following cases, give a function call/ expression that will yield the desired output:
a. An even random integer from the first 500 natural numbers.
b. A randomly chosen multiple of five from the first 500 natural numbers.
c. Value of pi upto 4 decimal places.
d. log (100)
2
e. log (1000)
10
f. log (1000)
e
g. Sine of an angle having degree 90.
h. Cosine of an angle having degree 90.
i. Greatest common divisors of 20 and 34.
j. Mean age of five children having ages 50, 54, 60, 61, and 65 cm .
k. Factorial of the number 10.
Assertion and Reasoning Based Questions
The following questions are Assertion(A) and Reasoning(R) based questions. 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
Assertion(A): A module is a collection of functions.
Reasoning(R): A function is a sequence of instructions to perform a specific task.
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. (b) 2. (a) 3. (c) 4. (a) 5. (c) 6. (c)
7. (a) 8. (c) 9. (b) 10. (c) 11. (a)
True or False
1. (T) 2. (F)
Fill in the blanks
1. random 2. math 3. statistics
Modules 255

