Page 279 - Computer Science Class 11 With Functions
P. 279
xxxix. xxxx. xxxxi.
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
Assertion(A): Every loop must have a range() in the header.
Reasoning(R): range() denotes a sequence of numbers.
Case Based Questions
1. Sumita is teaching her younger brother about dividends and divisors. To make him practice the concept, she wants to write
a program in Python that can quickly generate all divisors of a given number. Can you help her in this task?
2. Nusrat has just studied Mersenne numbers. He knows that numbers in the form of 2 1 are called Mersenne numbers. For
n_
example
2 –1 = 1, 2 –1 = 3, 2 –1 = 7, and so on.
3
2
1
He now wants to write a program in Python that displays the first n Mersenne numbers, where n is provided by the user at
execution time. Help him to do that.
Multiple Choice Questions
1. (a) 2. (c) 3. (c) 4. (c) 5. (b) 6. (c) 7. (b) 8. (a) 9. (b)
True or False
1. (F) 2. (T) 3. (F) 4. (F) 5. (T) 6. (T)
Fill in the blanks
1. else 2. control 3. break 4. outer, inner
5. endless / infinite 6. pass
Looping in Python 277

