MCQ Answer

What is the interval of the value generated by the function random.random(), assuming that the random module has already been imported?

What is the interval of the value generated by the function random.random(), assuming that the random module has already been imported?

फ़ंक्शन द्वारा जनरेटेड वैल्यू का इंटरवल random.random () है, यह मानते हुए कि रैंडम मॉड्यूल पहले से ही इम्पोर्ट किया गया है?
Topic : Modules in Python

A. (0,1)

B. (0,1]

C. [0,1]

D. [0,1)




Correct Answer is :

D. [0,1)



Explanation
The function random.random() generates a random value in the interval [0,1), that is, including zero but excluding one.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz