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.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 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 Best Website and Software Company in Allahabad