KnowledgeBoat Logo
|

Computer Science

Which of the following cannot be returned by random.randrange(4) ?

  1. 0
  2. 3
  3. 2.3
  4. None of these

Python Libraries

2 Likes

Answer

2.3

Reason — The random.randrange(4) function returns a randomly selected integer from the range [0, 1, 2, 3], which includes integers only. It cannot return a floating-point number like 2.3.

Answered By

2 Likes


Related Questions