CBSE Class 11 Computer Science Question 4 of 63

Introduction to Python Modules — Question 4

Back to all questions
4
Question

Question 4

Assertion (A): Some of the real-life applications of random module include CAPTCHA, OTP generation, automatic password generator and auto-filling, etc.

Reasoning (R): To import a random module, use:

import random
from random import*
  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true but R is not the correct explanation of A.

Explanation
The random module is used in various real-life applications like CAPTCHA, OTP generation, automatic password generation, and auto-filling forms. The statement to import random module is

import random
from random import *