CBSE Class 11 Computer Science
Question 4 of 63
Introduction to Python Modules — Question 4
Back to all questions 4
Question 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*- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
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 *