CBSE Class 11 Computer Science
Question 2 of 63
Introduction to Python Modules — Question 2
Back to all questions 2
Question Assertion (A): The randint() method returns an integer from the specified range.
Reasoning (R): The syntax for randint() is: random.randint (start:stop)
- 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.
A is true but R is false.
Explanation
The randint() method generates a random integer number from the specified range. The syntax for randint() is random.randint(a, b), where a is the lower bound and b is the upper bound.