Computer Science

Assertion (A): The randint() method returns an integer from the specified range.

Reasoning (R): The syntax for randint() is: random.randint (start:stop)

  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.

Python Modules

1 Like

Answer

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.

Answered By

3 Likes


Related Questions