O Level Online Exam
Menu mobile
Home
MCQ Topic Wise
IT TOOLS AND NETWORK BASICS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Online Mock Test
IT TOOLS AND NETWORK BASICS
New
WEB DESIGNING AND PUBLISHING
New
PYTHON PROGRAMMING
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Previous Year Papers
Practical Exam Papers
Videos
MCQ : MODULES IN PYTHON For NIELIT O Level Exam
MODULES IN PYTHON For NIELIT O Level Exam
00:00:00
English
Hindi
Question No# :
01
out of 50
Report Bug
Bookmark
Which keyword is used to modify a global variable inside a function?
किसी फंक्शन के अंदर ग्लोबल वेरिएबल को मॉडिफाई करने के लिए किस कीवर्ड का उपयोग किया जाता है?
A.
static
static
B.
global
global
C.
public
public
D.
extern
extern
Question No# :
02
out of 50
Report Bug
Bookmark
Which of these definitions correctly describes a module?
इनमें से कौन सी परिभाषा सही ढंग से एक मॉड्यूल का वर्णन करती है?
A.
Denoted by triple quotes for providing the specification of certain program elements
कुछ प्रोग्राम एलीमेंटों के विनिर्देश प्रदान करने के लिए ट्रिपल कोट्स द्वारा अस्वीकृत
B.
Design and implementation of specific functionality to be incorporated into a program
एक प्रोग्राम में शामिल किए जाने के लिए विशिष्ट कार्यक्षमता का डिजाइन और कार्यान्वयन
C.
Defines the specification of how it is to be used
इसका उपयोग कैसे करना है, इसके विनिर्देश को परिभाषित करता है
D.
Any program that reuses code
कोई भी प्रोग्राम जो कोड का पुनः उपयोग करता है
Question No# :
03
out of 50
Report Bug
Bookmark
random.shuffle() function shuffle value of
random.shuffle() फंक्शन किसकी वैल्यू को शफल करता है
A.
take a sequence, like a list, and arrange the items in ascending order
take a sequence, like a list, and arrange the items in ascending order
B.
take a sequence, like a list, and reorganize the order of the items.
take a sequence, like a list, and reorganize the order of the items.
C.
take a sequence, like a list, and arrange the items in descending
take a sequence, like a list, and arrange the items in descending
D.
take a sequence, like a list, and return the same copy of sequence
take a sequence, like a list, and return the same copy of sequence
Question No# :
04
out of 50
Report Bug
Bookmark
Which of the following is the basic I/O connections in file ?
फ़ाइल में निम्न में से कौन सा बुनियादी I/O कनेक्शन है?
A.
Standard Input
Standard Input
B.
Standard Output
Standard Output
C.
Standard Errors
Standard Errors
D.
All of the mentioned
All of the mentioned
Question No# :
05
out of 50
Report Bug
Bookmark
Which scope is created by a function defined inside another function?
किसी दूसरे function के अंदर defined function द्वारा कौन-सा scope बनाया जाता है?
A.
Local
Local
B.
Global
Global
C.
Enclosing
Enclosing
D.
Built-in
Built-in
Question No# :
06
out of 50
Report Bug
Bookmark
A stores information in the form of a stream of ASCII or unicode characters i.e. human readable.
एक सूचन को मानव पठनीय अर्थात ASCII या यूनिकोड वर्णों की एक स्ट्रीम के रूप में संग्रहीत करती है।
A.
Text file
टेक्स्ट फाइल
B.
Binary file
बाइनरी फाइल
C.
Both (A) and (B)
(A) और (A) दोनों
D.
None of these
इनमे से कोई नहीं
Question No# :
07
out of 50
Report Bug
Bookmark
What does LEGB stand for in Python scope rules?
पायथन स्कोप नियमों में LEGB का पूर्ण रूप क्या है?
A.
Local, Enclosing, Graphical, Built-in
Local, Enclosing, Graphical, Built-in
B.
Local, External, Global, Binary
Local, External, Global, Binary
C.
List, Entry, Global, Block
List, Entry, Global, Block
D.
Local, Enclosing, Global, Built-in
Local, Enclosing, Global, Built-in
Question No# :
08
out of 50
Report Bug
Bookmark
Which of the following is equivalent to random.randint(3, 6)?
निम्नलिखित में से कौन सा random.randint(3, 6) के बराबर है?
A.
random.choice([3, 6])
random.choice([3, 6])
B.
random.randrange(3, 6)
random.randrange(3, 6)
C.
3 + random.randrange(3)
3 + random.randrange(3)
D.
3 + random.randrange(4)
3 + random.randrange(4)
Question No# :
09
out of 50
Report Bug
Bookmark
Which of the following functions is not defined under the sys module?
निम्नलिखित फंक्शंस में से कौन सी sys मॉड्यूल के अंडर डिफाइन नहीं है?
A.
sys.platform
sys.platform
B.
sys.path
sys.path
C.
sys.readline
sys.readline
D.
sys.argv
sys.argv
Question No# :
10
out of 50
Report Bug
Bookmark
Which operator is used in Python to import modules from packages?
पैकेज से मॉड्यूल आयात करने के लिए पायथन में किस ऑपरेटर का उपयोग किया जाता है?
A.
.
.
B.
*
*
C.
->
->
D.
&
&
Question No# :
11
out of 50
Report Bug
Bookmark
Which file extension is used for Python modules?
Python modules के लिए standard file extension कौन-सी है?
A.
.py
.py
B.
.mod
.mod
C.
.exe
.exe
D.
.txt
.txt
Question No# :
12
out of 50
Report Bug
Bookmark
Which of the following will not be returned by random.choice(“1 ,”)?
निम्नलिखित में से कौन सा random.choice(“1 ,”) द्वारा रिटर्न नहीं किया जाएगा?
A.
1
1
B.
(space)
(space)
C.
,
,
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
13
out of 50
Report Bug
Bookmark
Which of the following functions can be used to find the coordinated universal time, assuming that the datetime module has already been imported?
निम्नलिखित कार्यों में से किसको कोआर्डिनेट यूनिवर्सल समय का पता लगाने के लिए यूज़ किया जा सकता है, यह मानते हुए कि डेटाइम मॉड्यूल पहले ही इम्पोर्ट किया जा चुका है?
A.
datetime.utc()
datetime.utc()
B.
datetime.datetime.utc()
datetime.datetime.utc()
C.
datetime.utcnow()
datetime.utcnow()
D.
datetime.datetime.utcnow()
datetime.datetime.utcnow()
Question No# :
14
out of 50
Report Bug
Bookmark
Modules are files saved with _____ extension.
मॉड्यूल _____ एक्सटेंशन के साथ सेव की गई फाइलें हैं।
A.
.module
.module
B.
.py
.py
C.
both a & b
a तथा b दोनों
D.
All of the above
उपर्युक्त सभी
Question No# :
15
out of 50
Report Bug
Bookmark
Which statement is correct to import all modules from the package ?
पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है?
A.
From package import all
From package import all
B.
From package import *
From package import *
C.
From package include all
From package include all
D.
From package include *
From package include *
Question No# :
16
out of 50
Report Bug
Bookmark
Command line arguments in Python are accessed using:
Python में command-line arguments को किससे access किया जाता है?
A.
argv[]
argv[]
B.
sys.argv
sys.argv
C.
input()
input()
D.
args[]
args[]
Question No# :
17
out of 50
Report Bug
Bookmark
To include the use of functions which are present in the random library, we must use the option:
उन फ़ंक्शन का उपयोग शामिल करने के लिए जो रैंडम लाइब्रेरी में मौजूद हैं, हमें किस ऑप्शन का यूज़ करना चाहिए:
A.
import random
इम्पोर्ट रैंडम
B.
random.h
रैंडम.h
C.
import.random
इम्पोर्ट.रैंडम
D.
random.random
रैंडम.रैंडम
Question No# :
18
out of 50
Report Bug
Bookmark
What is Full form of LEGB ?
LEGB का फुल फॉर्म क्या है?
A.
Low, Enclosing, Global and Built-in
Low, Enclosing, Global and Built-in
B.
Local, Enclosing, Global and Built-in
Local, Enclosing, Global and Built-in
C.
Local, Ending, Global and Built-in
Local, Ending, Global and Built-in
D.
Light, Emitting, Global and Built-in
Light, Emitting, Global and Built-in
Question No# :
19
out of 50
Report Bug
Bookmark
What does random.shuffle(x) do when x = [1, 2, 3]?
जब x = [1, 2, 3] random.shuffle(x) क्या करता है?
A.
error
एरर
B.
do nothing, it is a placeholder for a function that is yet to be implemented
कुछ भी न करें, यह एक फ़ंक्शन के लिए एक प्लेसहोल्डर है जिसे अभी तक लागू नहीं किया गया है
C.
shuffle the elements of the list in-place
सूची के एलिमेंट्स को इन-प्लेस में शफल करें
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
20
out of 50
Report Bug
Bookmark
Which statement imports only selected names from a module?
केवल selected names को module से import करने वाला statement कौन-सा है?
A.
import math
import math
B.
import math as m
import math as m
C.
from math import sqrt
from math import sqrt
D.
load math
load math
Question No# :
21
out of 50
Report Bug
Bookmark
Which module in python can be used for working with network socket?
पायथन में किस मॉड्यूल का उपयोग नेटवर्क सॉकेट के साथ काम करने के लिए किया जा सकता है?
A.
HTTP
HTTP
B.
urllib
urllib
C.
socket
socket
D.
header
header
Question No# :
22
out of 50
Report Bug
Bookmark
Which of the following is equivalent to random.randrange(3)?
निम्नलिखित में से कौन random.randrange(3) के बराबर है?
A.
range(3)
रेंज (3)
B.
random.choice(range(0, 3))
random.choice (रेंज (0, 3))
C.
random.shuffle(range(3))
random.shuffle (रेंज (3))
D.
random.select(range(3))
random.select (रेंज (3))
Question No# :
23
out of 50
Report Bug
Bookmark
The function random.randint(4) can return only one of the following values. Which?
फ़ंक्शन random.randint (4) निम्न में से केवल एक वैल्यू रिटर्न कर सकता है। कौन से है ?
A.
4
4
B.
3.4
3.4
C.
error
एरर
D.
5
5
Question No# :
24
out of 50
Report Bug
Bookmark
What is a module in Python?
पायथन में मॉड्यूल क्या होता है?
A.
A package manager
A package manager
B.
A loop structure
A loop structure
C.
A file containing Python code
A file containing Python code
D.
A variable type
A variable type
Question No# :
25
out of 50
Report Bug
Bookmark
Choose the correct option with respect to Python.
पाइथन के सन्दर्भ में सही विकल्प का चयन कीजिए
A.
Both tuples and lists are immutable
टुपल्स और लिस्टस दोनों अपरिवर्तनीय है
B.
Tuples are immutable while lists are mutable
टुपल्स अपरिवर्तनीय है जबकि लिस्ट्स परिवर्तनशील है
C.
Both tuples and lists are mutable
टुपल्स और लिस्ट्स दोनों परिवर्तनशील है
D.
Tuples are mutable while lists are immutable
टुपल्स परिवर्तनशील होते है जबकि लिस्ट्स अपरिवर्तनीय होती है
Question No# :
26
out of 50
Report Bug
Bookmark
To use a module in another module, you must import it using an, statement
अन्य मॉड्यूल में किसी मॉड्यूल का उपयोग करने के लिए, आपको उस स्टेटमेंट का उपयोग करके इम्पोर्ट करना होगा
A.
import
import
B.
include
include
C.
both (A) and (B)
(A)और (B)दोनों
D.
none of the above
उपरोक्त में से कोई नहीं
Question No# :
27
out of 50
Report Bug
Bookmark
A Python module is a file with the __________ file extension that contains valid Python code.
एक पायथन मॉड्यूल __________ फाइल एक्सटेंशन वाली एक फाइल है जिसमें वैध पायथन कोड होता है।
A.
.pym
.pym
B.
.pymodule
.pymodule
C.
module
module
D.
.py
.py
Question No# :
28
out of 50
Report Bug
Bookmark
This imports * statement import all in the modules except those beginning with ____ .
यह imports * स्टेटमेन्ट मॉड्यूल में सभी नामों को इंपोर्ट करता है जो .......से शुरुआत करते हैं।
A.
_
_
B.
&
&
C.
%
%
D.
None of the above
उपरोक्त में से कोई नहीं
Question No# :
29
out of 50
Report Bug
Bookmark
Which of the following will never be displayed on executing print(random.choice({0: 1, 2: 3}))?
निम्नलिखित में से कौन सा प्रिंट निष्पादित करने पर कभी प्रदर्शित नहीं होगा (random.choice ({0: 1, 2: 3}))?
A.
0
0
B.
1
1
C.
KeyError: 1
KeyError: 1
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
30
out of 50
Report Bug
Bookmark
os.getlogin() function return?
os.getlogin() फ़ंक्शन क्या रिटर्न करेगा ?
A.
Return the name of the user logged in to the terminal
Return the name of the user logged in to the terminal
B.
Return the email of the user logged in to the terminal
Return the email of the user logged in to the terminal
C.
Return the login time when user logged in to the terminal
Return the login time when user logged in to the terminal
D.
None of the above
None of the above
Question No# :
31
out of 50
Report Bug
Bookmark
What does the nonlocal keyword refer to?
nonlocal keyword किस scope को refer करता है?
A.
Enclosing function scope
Enclosing function scope
B.
Built-in scope
Built-in scope
C.
Global scope
Global scope
D.
Local scope
Local scope
Question No# :
32
out of 50
Report Bug
Bookmark
The sleep function (under the time module) is used to ___________
स्लीप फ़ंक्शन (टाइम मॉड्यूल के अंडर) ___________ के लिए यूज़ किया जाता है
A.
Pause the code for the specified number of seconds
स्पेसिफ़िएड सेकंड के लिए कोड को पॉज़ करे
B.
Return the specified number of seconds, in terms of milliseconds
मिलीसेकेंड के टर्म में ,स्पेसिफ़िएड सेकंड रिटर्न करे
C.
Stop the execution of the code
कोड का एक्सक्यूशन स्टॉप करे
D.
Return the output of the code had it been executed earlier by the specified number of seconds
कोड का आउटपुट रिटर्न करे जिसे पहले स्पेसिफ़िएड सेकंड के द्वारा एक्सेक्यूट किया गया था
Question No# :
33
out of 50
Report Bug
Bookmark
Which statement imports an entire module?
कौन-सा statement पूरे module को import करता है?
A.
import math
import math
B.
from math import pi
from math import pi
C.
include math
include math
D.
using math
using math
Question No# :
34
out of 50
Report Bug
Bookmark
Which of the following cannot be returned by random.randrange(4)?
निम्नलिखित में से क्या random.randrange (4) द्वारा रिटर्न नहीं किया जा सकता है?
A.
0
0
B.
3
3
C.
2.3
2.3
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
35
out of 50
Report Bug
Bookmark
Both the functions randint and uniform accept ____________ parameters.
दोनों फ़ंक्शन में रैंडम और यूनिफार्म ____________ पैरामीटर्स को स्वीकार करते हैं।
A.
0
0
B.
1
1
C.
3
3
D.
2
2
Question No# :
36
out of 50
Report Bug
Bookmark
Which of the following functions can help us to find the version of python that we are currently working on?
निम्नलिखित में से कौन सा फ़ंक्शन हमें वर्तमान में काम कर रहे Python के वर्जन को फाइंड करने में हेल्प कर सकता है?
A.
sys.version
sys.version
B.
sys.version()
sys.version()
C.
sys.version(0)
sys.version(0)
D.
sys.version(1)
sys.version(1)
Question No# :
37
out of 50
Report Bug
Bookmark
When a module is imported, its code is:
Module import होने पर उसका code ______।
A.
Ignored
Ignored
B.
Compiled only
Compiled only
C.
Executed once
Executed once
D.
Executed every time
Executed every time
Question No# :
38
out of 50
Report Bug
Bookmark
What is the range of values that random.random() can return?
उन वैल्यू की रेंज क्या है जो random.random () रिटर्न आ सकते हैं?
A.
[0.0, 1.0]
[0.0, 1.0]
B.
(0.0, 1.0]
(0.0, 1.0]
C.
(0.0, 1.0)
(0.0, 1.0)
D.
[0.0, 1.0)
[0.0, 1.0)
Question No# :
39
out of 50
Report Bug
Bookmark
What happens if a local and global variable have same name?
यदि किसी लोकल और ग्लोबल वेरिएबल का नाम एक ही हो तो क्या होगा?
A.
Local variable gets priority
Local variable gets priority
B.
Global variable gets priority
Global variable gets priority
C.
Error occurs
Error occurs
D.
Both are merged
Both are merged
Question No# :
40
out of 50
Report Bug
Bookmark
Scope of a name in Python refers to:
Python में name के scope का अर्थ क्या है?
A.
Lifetime of an object
Lifetime of an object
B.
Region of code where a name is accessible
Region of code where a name is accessible
C.
Size of a variable
Size of a variable
D.
Memory address
Memory address
Question No# :
41
out of 50
Report Bug
Bookmark
Which of the following functions helps us to randomize the items of a list?
निम्नलिखित में से कौन सा फ़ंक्शन किसी लिस्ट के आइटम्स को रैनडोमाइज़ करने में हमारी हेल्प करता है?
A.
seed
सीड
B.
randomise
रैनडोमाइज़
C.
shuffle
शफल
D.
uniform
यूनिफार्म
Question No# :
42
out of 50
Report Bug
Bookmark
Which of the following creates a pattern object?
निम्न में से कौन एक पैटर्न ऑब्जेक्ट बनाता है?
A.
re.create(str)
re.create(str)
B.
re.regex(str)
re.regex(str)
C.
re.compile(str)
re.compile(str)
D.
re.assemble(str)
re.assemble(str)
Question No# :
43
out of 50
Report Bug
Bookmark
What is the interval of the value generated by the function random.random(), assuming that the random module has already been imported?
फ़ंक्शन द्वारा जनरेटेड वैल्यू का इंटरवल random.random () है, यह मानते हुए कि रैंडम मॉड्यूल पहले से ही इम्पोर्ट किया गया है?
A.
(0,1)
(0,1)
B.
(0,1]
(0,1]
C.
[0,1]
[0,1]
D.
[0,1)
[0,1)
Question No# :
44
out of 50
Report Bug
Bookmark
What will be the output of random.choice('fun') if the random module has not already been imported?
random.choice('fun') का output क्या हो सकता है, यदि random module पहले से import नहीं किया गया है?
A.
fun
fun
B.
u
u
C.
Error
Error
D.
Either f, u, or n
Either f, u, or n
Question No# :
45
out of 50
Report Bug
Bookmark
Extension of python module is
पायथन मॉड्यूल का एक्सटेंशन क्या है
A.
.mod
.mod
B.
.module
.module
C.
.py
.py
D.
.python
.python
Question No# :
46
out of 50
Report Bug
Bookmark
Which scope is searched first according to the LEGB rule?
LEGB rule के अनुसार सबसे पहले कौन-सा scope search किया जाता है?
A.
Global
Global
B.
Enclosing
Enclosing
C.
Built-in
Built-in
D.
Local
Local
Question No# :
47
out of 50
Report Bug
Bookmark
Which module is to be imported for using randint() function?
randint () फंक्शन का उपयोग करने के लिए कौन सा मॉडयूल आयात किया जाता है ?
A.
random
random
B.
randrange
randrange
C.
randomrange
randomrange
D.
rand
rand
Question No# :
48
out of 50
Report Bug
Bookmark
Which of the following statements are used in Exception Handling in Python?
पायथन में एक्सेप्शन हैंडलिंग में निम्नलिखित में से कौन सा कथन उपयोग किया जाता है?
A.
try
try
B.
except
except
C.
finally
finally
D.
All of the above
All of the above
Question No# :
49
out of 50
Report Bug
Bookmark
What the does random.seed(3) return?
random.seed (3) क्या रिटर्न करता है ?
A.
True
सही
B.
None
कोई नहीं
C.
3
3
D.
1
1
Question No# :
50
out of 50
Report Bug
Bookmark
Which type of elements are accepted by random.shuffle()?
किस प्रकार के एलिमेंट्स को random.shuffle () द्वारा एक्सेप्ट किया जाता है?
A.
strings
स्ट्रिंग्स
B.
lists
लिस्ट्स
C.
tuples
tuples
D.
integers
इन्टिजर
Latest Current Affairs 2026
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Online MBA 2 years
Online MCA
Online BCA
Best Website and Software Company in Allahabad