Report Bug

Qus

Which can be the output of the following Python code?

import random
print(random.randrange(1,100,10))
Qus

निम्नलिखित पायथन कोड का आउटपुट कौन सा हो सकता है?

import random
print(random.randrange(1,100,10))



A. 32
B. 67
C. 91
D. 80


Solution
C. 91



Explanation
The output of this function can be any value which is a multiple of 10, plus 1. Hence a value like 11, 21, 31, 41…91 can be the output. Also, the value should necessarily be between 1 and 100. The only option which satisfies this criteria is 91.
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