1.

What is the range of values that random.random() can return?(a) [0.0, 1.0](b) (0.0, 1.0](c) (0.0, 1.0)(d) [0.0, 1.0)The question was asked during a job interview.Question is from Random Module topic in section Mapping Functions and Modules of Python

Answer»

The CORRECT ANSWER is (d) [0.0, 1.0)

To explain: Any number that is GREATER than or equal to 0.0 and lesser than 1.0 can be RETURNED.



Discussion

No Comment Found

Related InterviewSolutions