Report Bug

Qus

What will be the output of the following Python function if the random module has already been imported?

random.randint(3.5,7)

Qusयदि रैंडम मॉड्यूल पहले से ही इम्पोर्ट किया गया है तो निम्न पायथन फ़ंक्शन का आउटपुट क्या होगा?


A. Error
B. Any integer between 3.5 and 7, including 7
C. Any integer between 3.5 and 7, excluding 7
D. The integer closest to the mean of 3.5 and 7


Solution
A. Error



Explanation
The function random.randint() does not accept a decimal value as a parameter. Hence the function shown above will throw an error.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad