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
Old Papers
Practical Questions
Videos
Projects
MCQ : FUNCTIONS IN PYTHON For NIELIT O Level Exam
FUNCTIONS IN PYTHON For NIELIT O Level Exam
00:00:00
English
Hindi
Question No# :
01
out of 50
Report Bug
Bookmark
What arithmetic operators cannot be used with strings?
स्ट्रिंग्स के साथ क्या अर्थमैटिक ऑपरेटरों का यूज़ नहीं किया जा सकता है?
A.
+
+
B.
*
*
C.
-
-
D.
All of the mentioned
सभी का उल्लेख है
Question No# :
02
out of 50
Report Bug
Bookmark
Which one of the following is incorrect?
निम्नलिखित में से कौन सा गलत है?
A.
The variables used inside function are called local variables.
फंक्शन के अंदर उपयोग किए जाने वाले वेरिएबल लोकल वेरिएबल कहलाते हैं।
B.
The local variables of a particular function can be used inside other functions, but these cannot be used in global space.
किसी विशेष फंक्शन के लोकल वेरिएबल का उपयोग अन्य फंक्शनो के अंदर किया जा सकता है, लेकिन इनका उपयोग ग्लोबल स्पेस में नहीं किया जा सकता है
C.
The variables used outside function are called global variables.
बाहरी फंक्शन का उपयोग करने वाले वेरिएबल को ग्लोबल वेरिएबल कहा जाता है
D.
In order to change the value of global variable inside function, keyword global is used.
फंक्शन के अंदर ग्लोबल वेरिएबल की वैल्यू को बदलने के लिए, कीवर्ड ग्लोबल का उपयोग किया जाता है।
Question No# :
03
out of 50
Report Bug
Bookmark
Which one of the following is the correct way of calling a function?
निम्नलिखित में से कौन-सा एक फंक्शन को कॉल करने का सही तरीका है?
A.
function_name()
function_name()
B.
call function_name()
call function_name()
C.
ret function_name()
ret function_name()
D.
function function_name()
function function_name()
Question No# :
04
out of 50
Report Bug
Bookmark
How do you define a function in Python?
पायथन में एक फ़ंक्शन कैसे घोषित किया जाता है?
A.
def function function_name():
def function function_name():
B.
declare function function_name():
declare function function_name():
C.
def function_name():
def function_name():
D.
declare function_name():
declare function_name():
Question No# :
05
out of 50
Report Bug
Bookmark
How are required arguments specified in the function heading?
फ़ंक्शन हेडिंग में आवश्यक आर्ग्यमन्ट कैसे स्पेसिफ़ाइड किए जाते हैं?
A.
identifier followed by an equal to sign and the default value
आइडेंटिफाइड साइन और डिफ़ॉल्ट वैल्यू के बराबर होता है
B.
identifier followed by the default value within backticks (“)
आइडेंटीफायर के पीछे डिफ़ॉल्ट वैल्यू के बाद (")
C.
identifier followed by the default value within square brackets ([])
स्क्वायर ब्रैकेट्स ([]) के भीतर डिफ़ॉल्ट वैल्यू के बाद आइडेंटीफायर
D.
identifier
आइडेंटीफायर
Question No# :
06
out of 50
Report Bug
Bookmark
If return statement is not used inside the function, the function will return:
यदि फंक्शन के अंदर रिटर्न स्टेटमेंट का उपयोग नहीं किया जाता है, तो फंक्शन रिटर्न करेगा:
A.
None
None
B.
0
0
C.
Null
Null
D.
Arbitary value
Arbitary value
Question No# :
07
out of 50
Report Bug
Bookmark
The values which are passed to a function definition are called
वे मान जो किसी फ़ंक्शन परिभाषा में पारित किए जाते हैं, कहलाते हैं
A.
Arguments
Arguments
B.
Subroutines
Subroutines
C.
Function
Function
D.
Definition
Definition
Question No# :
08
out of 50
Report Bug
Bookmark
What is tail recursion?
टेल रिकर्शन क्या है?
A.
A recursive function that has two base cases
एक रिकर्सिव फ़ंक्शन जिसमें दो बेस केसेस हैं
B.
A function where the recursive functions leads to an infinite loop
एक फ़ंक्शन जहां रिकर्सिव फ़ंक्शन एक इनफिनिट लूप की ओर जाता है
C.
A recursive function where the function doesn’t return anything and just prints the values
एक रिकर्सिव फ़ंक्शन जहां फ़ंक्शन कुछ भी वापस नहीं करता है और केवल वैल्यूज को प्रिंट करता है
D.
A function where the recursive call is the last thing executed by the function
एक फ़ंक्शन जहां रिकर्सिव कॉल फ़ंक्शन द्वारा एक्सेक्यूटेड लास्ट चीज़ है
Question No# :
09
out of 50
Report Bug
Bookmark
Debugging is the process of fixing a______in the software.
डिबगिंग सॉफ्टवेयर में ______ को ठीक करने की प्रक्रिया है।
A.
procedure
प्रकिया
B.
function
कार्य
C.
bug
बग
D.
None of these
इनमे से कोई नहीं
Question No# :
10
out of 50
Report Bug
Bookmark
What is a recursive function?
एक रिकर्सिव फंक्शन क्या है?
A.
A function that calls other function.
फंक्शन जो दूसरे फंक्शन को कॉल करता है ।
B.
A function which calls itself.
एक फंक्शन जो स्वयं को कॉल करता है
C.
Both A and B
A तथा B दोनों
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
11
out of 50
Report Bug
Bookmark
Which symbol is used for variable-length positional arguments?
चर-लंबाई वाले पोजीशनल आर्गुमेंट्स के लिए किस प्रतीक का उपयोग किया जाता है?
A.
#
#
B.
&
&
C.
*
*
D.
**
**
Question No# :
12
out of 50
Report Bug
Bookmark
The variables in a function definition are called as
फ़ंक्शन परिभाषा में वेरिएबल्स को कहा जाता है
A.
Subroutines
Subroutines
B.
Function
Function
C.
Definition
Definition
D.
Parameters
Parameters
Question No# :
13
out of 50
Report Bug
Bookmark
What happens if a local variable exists with the same name as the global variable you want to access?
यदि कोई लोकल वैरिएबल वैसा ही नाम के साथ मौजूद है जैसा कि ग्लोबल वैरिएबल जिसे आप एक्सेस करना चाहते हैं?
A.
Error
एरर
B.
The local variable is shadowed
लोकल वैरिएबल छाया हुआ है
C.
Undefined behavior
अनडिफाइन बिहेवियर
D.
The global variable is shadowed
ग्लोबल वैरिएबल छाया हुआ है
Question No# :
14
out of 50
Report Bug
Bookmark
What is recursion in python?
पाइथन में रिकर्शन फंक्शन के है
A.
Repeating a process in a loop
Repeating a process in a loop
B.
Calling a function from within itself
Calling a function from within itself
C.
Using a loop to iterate over elements
Using a loop to iterate over elements
D.
Breaking down a problem into smaller subproblems
Breaking down a problem into smaller subproblems
Question No# :
15
out of 50
Report Bug
Bookmark
How are keyword arguments specified in the function heading?
फ़ंक्शन हेडिंग में कीवर्ड आर्ग्यमन्ट कैसे स्पेसिफ़ाइड किए जाते हैं?
A.
one-star followed by a valid identifier
एक के बाद एक वैलिड आइडेंटिफायर
B.
one underscore followed by a valid identifier
एक वैलिड आइडेंटिफायर के बाद एक अंडरस्कोर
C.
two stars followed by a valid identifier
दो स्टार्स के बाद एक वैलिड आइडेंटिफायर है
D.
two underscores followed by a valid identifier
वैलिड आइडेंटिफायर द्वारा दो अंडरस्कोर
Question No# :
16
out of 50
Report Bug
Bookmark
The small sections of code that are used to perform a particular task is called
A.
Subroutines
Subroutines
B.
Files
Files
C.
Pseudo code
Pseudo code
D.
Modules
Modules
Question No# :
17
out of 50
Report Bug
Bookmark
Which of the following functions will not result in an error when no arguments are passed to it?
जब कोई आर्ग्यमन्ट पास नहीं किया जाता हैं, तो निम्नलिखित में से कौन से फंक्शन में एरर आएगा ?
A.
min()
min()
B.
divmod()
divmod()
C.
all()
all()
D.
float()
float()
Question No# :
18
out of 50
Report Bug
Bookmark
Which of the following is a distinct syntactic block?
निम्नलिखित में से कौन सा एक विशिष्ट वाक्यात्मक ब्लॉक है?
A.
Subroutines
Subroutines
B.
Function
Function
C.
Definition
Definition
D.
Modules
Modules
Question No# :
19
out of 50
Report Bug
Bookmark
Which of these is false about recursion?
इनमें से कौन सी पुनरावृत्ति के बारे में गलत है?
A.
Recursive function can be replaced by a non-recursive function
रिकर्सिव फ़ंक्शन को नॉन-रिकर्सिव फ़ंक्शन द्वारा रेप्लस किया जा सकता है
B.
Recursive functions usually take more memory space than non-recursive function
रिकर्सिव फ़ंक्शन आमतौर पर नॉन-रिकर्सिव फ़ंक्शन की तुलना में अधिक मेमोरी स्पेस लेते हैं
C.
Recursive functions run faster than non-recursive function
रिकर्सिव फ़ंक्शन नॉन-रिकर्सिव फ़ंक्शन की तुलना में तेज़ी से चलते हैं
D.
Recursion makes programs easier to understand
रिकर्सियन प्रोग्राम्स को समझने में आसान बनाता है
Question No# :
20
out of 50
Report Bug
Bookmark
____ are the arguments passed to a function in correct positional order.
सही स्थिति क्रम में किसी फंक्शन को दिए गए आर्गुमेन्ट हैं।
A.
Required arguments
आवश्यक आर्गुमेन्ट
B.
Keyword arguments
कीवर्ड आर्गुमेन्ट
C.
Default arguments
डिफॉल्ट आर्गुमेन्ट
D.
Variable-length arguments
वेरियेबिल लेंग्थ आर्गुमेन्ट्स
Question No# :
21
out of 50
Report Bug
Bookmark
Which keyword is used for function in Python language?
पायथन भाषा में फंक्शन के लिए कौन सा कीवर्ड प्रयोग किया जाता है?
A.
function
function
B.
def
def
C.
fun
fun
D.
define
define
Question No# :
22
out of 50
Report Bug
Bookmark
Function defined to achieve some task as per the programmers requirement is called a :
प्रोग्रामर की आवश्यकता के अनुसार किसी कार्य को प्राप्त करने के लिए परिभाषित फंक्शन कहलाता है
A.
User Defined Function
User Defined Function
B.
Library Functions
Library Functions
C.
Builtin Functions
Builtin Functions
D.
All of the above
All of the above
Question No# :
23
out of 50
Report Bug
Bookmark
Where is function defined?
फंक्शन को कहां डिफाइन किया जाता है?
A.
In Module
मॉड्यूल
B.
In Class
क्लास
C.
In Another function
एक और फंक्शन
D.
All of these
उपर्युक्त सभीं
Question No# :
24
out of 50
Report Bug
Bookmark
You can also create your own functions, these functions are called?
आप अपने खुद के फंक्शन भी बना सकते हैं, इन फंक्शन्स को क्या कहते हैं?
A.
built-in functions
built-in functions
B.
user-defined functions
user-defined functions
C.
py function
py function
D.
None of the above
इनमें से कोई नहीं
Question No# :
25
out of 50
Report Bug
Bookmark
Which of the following functions does not necessarily accept only iterables as arguments?
निम्नलिखित में से कौन सा फंक्शन केवल नेससेरली को आर्ग्यमन्ट के रूप में एक्सेप्ट नहीं करता है?
A.
enumerate()
इनूमरेट()
B.
all()
ऑल()
C.
chr()
chr()
D.
max()
मैक्स()
Question No# :
26
out of 50
Report Bug
Bookmark
Which is the most appropriate definition for recursion?
पुनरावृत्ति के लिए सबसे उपयुक्त परिभाषा कौन सी है?
A.
A function that calls itself
एक फ़ंक्शन जो स्वयं को कॉल करता है
B.
A function execution instance that calls another execution instance of the same function
एक फ़ंक्शन एक्सेक्यूशन इंस्टैंस जो उसी फ़ंक्शन के किसी अन्य एक्सेक्यूशन इंस्टैंस को कॉल करता है
C.
A class method that calls another class method
एक क्लास मैथड जो दूसरे क्लास मैथड को बुलाती है
D.
An in-built method that is automatically called
एक अंतर्निहित पद्धति जिसे स्वचालित रूप से कहा जाता है
Question No# :
27
out of 50
Report Bug
Bookmark
What is the scope of a function parameter?
फंक्शन पैरामीटर का स्कोप क्या है?
A.
Global Scope
Global Scope
B.
Built-in Scope
Built-in Scope
C.
Local Scope
Local Scope
D.
Module Scope
Module Scope
Question No# :
28
out of 50
Report Bug
Bookmark
Suppose there is a list such that: l=[2,3,4]. If we want to print this list in reverse order, which of the following methods should be used?
मान लीजिए कि एक लिस्ट ऐसी है: l = [2,3,4]। यदि हम इस लिस्ट को रिवर्स ऑर्डर में प्रिंट करना चाहते हैं, तो निम्न में से किस मैथड का यूज़ किया जाना चाहिए?
A.
reverse(l)
reverse(l)
B.
list(reverse[(l)])
list(reverse[(l)])
C.
reversed(l)
reversed(l)
D.
list(reversed(l))
list(reversed(l))
Question No# :
29
out of 50
Report Bug
Bookmark
Given a string x="hello" What is the output of x.count('l')?
एक स्ट्रिंग x = "hello " को देखते हुए x.count ('1') का आउटपुट क्या है?
A.
2
2
B.
1
1
C.
0
0
D.
none
कोई नहीं
Question No# :
30
out of 50
Report Bug
Bookmark
Which of the following is an anonymous function in Python?
निम्नलिखित में से कौन सा पाइथन में एक अनाम फ़ंक्शन है?
A.
Recursive Function
Recursive Function
B.
Lambda Function
Lambda Function
C.
Built-in Function
Built-in Function
D.
Generator Function
Generator Function
Question No# :
31
out of 50
Report Bug
Bookmark
If a function doesn't have a return statement, which of the following does the function return ?
यदि किसी फंक्शन का रिटर्न स्टेटमेंट नहीं है, तो निम्न में से कौन सा फंक्शन रिटर्न होता है?
A.
int
इंट
B.
null
नल
C.
None
कोई नहीं
D.
An exception is thrown without the return statement
रिटर्न स्टेटमेंट के बिना अपवाद को थ्रो कर दिया जाता है
Question No# :
32
out of 50
Report Bug
Bookmark
Which of the following data structures is returned by the functions globals() and locals()?
निम्नलिखित में से कौन सा डेटा स्ट्रक्चर फंक्शन ग्लोबल्स () और लोकल लोगों () द्वारा रिटर्न की जाती है?
A.
list
लिस्ट
B.
set
सेट
C.
dictionary
डिक्शनरी
D.
tuple
टपल
Question No# :
33
out of 50
Report Bug
Bookmark
Which of the following is TRUE about lambda functions?
लैम्डा फंक्शन के बारे में निम्नलिखित में से कौन सा कथन सत्य है?
A.
Can contain multiple statements
Can contain multiple statements
B.
Can have only one expression
Can have only one expression
C.
Must use return statement
Must use return statement
D.
Cannot take arguments
Cannot take arguments
Question No# :
34
out of 50
Report Bug
Bookmark
The function pow(x,y,z) is evaluated as:
फ़ंक्शन pow(x, y, z) का मूल्यांकन इस प्रकार है:
A.
(x**y)**z
(x**y)**z
B.
(x**y) / z
(x**y) / z
C.
(x**y) % z
(x**y) % z
D.
(x**y)*z
(x**y)*z
Question No# :
35
out of 50
Report Bug
Bookmark
What does a function return if there is no return statement?
यदि किसी फंक्शन में रिटर्न स्टेटमेंट नहीं है, तो वह फंक्शन क्या रिटर्न करेगा?
A.
0
0
B.
False
False
C.
None
None
D.
Error
Error
Question No# :
36
out of 50
Report Bug
Bookmark
To which of the following the "in" operator can be used to check if an item is in it?
निम्नलिखित में से किसके लिए "in" ऑपरेटर का उपयोग यह जांचने के लिए किया जा सकता है कि कोई आइटम उसमें है या नहीं?
A.
Lists
लिस्ट्स
B.
Dictionary
ड़िक्शनरी
C.
String
सेट
D.
All of the mentioned
उल्लिखित सभी
Question No# :
37
out of 50
Report Bug
Bookmark
How many arguments a Python program can accept from the command line?
पायथन प्रोग्राम कमांड लाइन से कितने तर्क स्वीकार कर सकता है?
A.
One
One
B.
Two
Two
C.
Three
Three
D.
Any Number of Times
Any Number of Times
Question No# :
38
out of 50
Report Bug
Bookmark
def keyword use for?
def कीवर्ड का उपयोग किसके लिए किया जाता है?
A.
Define keyword in python
Define keyword in python
B.
Define variable in python
Define variable in python
C.
Define function in python
Define function in python
D.
All of the above
ऊपर के सभी
Question No# :
39
out of 50
Report Bug
Bookmark
The code block within every function starts with a ____ ?
प्रत्येक फंक्शन के भीतर एक कोड ब्लॉक ... से शुरू होता है?
A.
;
;
B.
: :
: :
C.
:
:
D.
%
%
Question No# :
40
out of 50
Report Bug
Bookmark
What is the correct syntax of a lambda function?
लैम्डा फंक्शन का सही सिंटैक्स क्या है?
A.
lambda x => x+1
lambda x => x+1
B.
lambda(x): x+1
lambda(x): x+1
C.
lambda x: x+1
lambda x: x+1
D.
def lambda(x): x+1
def lambda(x): x+1
Question No# :
41
out of 50
Report Bug
Bookmark
The function divmod(a,b), where both ‘a’ and ‘b’ are integers is evaluated as:
फ़ंक्शन डिमोड (ए, बी), जहां दोनों 'ए' और 'बी' इन्टिजर हैं, का इवैल्यूऐटनिम्नानुसार किया जाता है:
A.
(a%b, a//b)
(a%b, a//b)
B.
(a//b, a%b)
(a//b, a%b)
C.
(a//b, a*b)
(a//b, a*b)
D.
(a/b, a%b)
(a/b, a%b)
Question No# :
42
out of 50
Report Bug
Bookmark
A variable declared outside all functions is known as:
किसी भी फ़ंक्शन के बाहर घोषित किए गए वेरिएबल को इस नाम से जाना जाता है:
A.
Local Variable
Local Variable
B.
Static Variable
Static Variable
C.
Global Variable
Global Variable
D.
Instance Variable
Instance Variable
Question No# :
43
out of 50
Report Bug
Bookmark
How are default arguments specified in the function heading?
फ़ंक्शन के हैडिंग में डिफ़ॉल्ट आर्ग्यमन्ट कैसे स्पेसिफ़ाइड किए जाते हैं?
A.
identifier followed by an equal to sign and the default value
आइडेंटिफाइड साइन और डिफ़ॉल्ट वैल्यू के बराबर होता है
B.
identifier followed by the default value within backticks (“)
आइडेंटीफायर के पीछे डिफ़ॉल्ट वैल्यू के बाद (")
C.
identifier followed by the default value within square brackets ([])
स्क्वायर ब्रैकेट्स ([]) के भीतर डिफ़ॉल्ट वैल्यू के बाद आइडेंटीफायर
D.
identifier
आइडेंटीफायर
Question No# :
44
out of 50
Report Bug
Bookmark
Which argument type allows specifying parameter names during function call?
किस प्रकार के तर्क से फंक्शन कॉल के दौरान पैरामीटर नाम निर्दिष्ट किए जा सकते हैं?
A.
Positional
Positional
B.
Keyword
Keyword
C.
Default
Default
D.
Variable
Variable
Question No# :
45
out of 50
Report Bug
Bookmark
Which of the following is NOT a valid type of argument in Python?
निम्नलिखित में से कौन सा पाइथन में मान्य तर्क प्रकार नहीं है?
A.
Required Argument
Required Argument
B.
Keyword Argument
Keyword Argument
C.
Default Argument
Default Argument
D.
Decimal Argument
Decimal Argument
Question No# :
46
out of 50
Report Bug
Bookmark
Which module in the python standard library parses options received from the command line?
पायथन स्टैंडर्ड लाइब्रेरी में कौन सा मॉड्यूल कमांड लाइन से प्राप्त ऑप्शन है?
A.
getopt
getopt
B.
os
os
C.
getarg
getarg
D.
main
main
Question No# :
47
out of 50
Report Bug
Bookmark
Which of the following function headers is correct ?
निम्नलिखित में से कौन सा फंक्शन हेडर सही है?
A.
def fun (a = 2, b = 3, c)
def fun (a = 2, b = 3, c)
B.
def fun(a = 2, b, c = 3)
def fun(a = 2, b, c = 3)
C.
def fun(a, b = 2, c = 3)
def fun(a, b = 2, c = 3)
D.
def fun(a, b, c = 3, d)
def fun(a, b, c = 3, d)
Question No# :
48
out of 50
Report Bug
Bookmark
Which of the following functions converts date to corresponding time in Python?
निम्नलिखित में से कौन सा फ़ंक्शन पायथन में दिनांक को संगत समय में परिवर्तित करता है?
A.
strptime()
strptime()
B.
strftime()
strftime()
C.
Both A and B
Both A and B
D.
None of the above
None of the above
Question No# :
49
out of 50
Report Bug
Bookmark
Which of the following modules need to be imported to handle date time computations in Python?
दिनांक समय गणनाओं को संभालने के लिए निम्नलिखित में से किस मॉड्यूल को आयात करने की आवश्यकता है? अजगर?
A.
datetime
datetime
B.
date
date
C.
time
time
D.
timedate
timedate
Question No# :
50
out of 50
Report Bug
Bookmark
Which part of the memory does the system store the parameter and local variables of a function call ?
मेमोरी का कौन सा भाग सिस्टम फ़ंक्शन कॉल के पैरामीटर और स्थानीय चर को संग्रहीत करता है?
A.
Heap
Heap
B.
Stack
Stack
C.
Uninitialized data segment
Uninitialized data segment
D.
None of the above
None of the above
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