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
Given a function that does not return any value, what value is shown when executed at the shell ?
एक फ़ंक्शन जो कोई मान नहीं लौटाता है ,शेल पर निष्पादित होने पर कौन सा मान दिखाया जाता है
A.
int
int
B.
bool
bool
C.
void
void
D.
None
None
Question No# :
02
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# :
03
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# :
04
out of 50
Report Bug
Bookmark
Which of the following statements is false about recursion?
निम्नलिखित में से कौन सा स्टेट्मेंट रिकर्शन के बारे में गलत है?
A.
Every recursive function must have a base case
प्रत्येक रिकर्सिव फ़ंक्शन का बेस केस होना चाहिए
B.
Infinite recursion can occur if the base case isn’t properly mentioned
यदि बेस केस का प्रॉपर्ली मेंशन्ड नहीं किया गया है तो इनफिनिट रिकर्शन हो सकती है
C.
A recursive function makes the code easier to understand
एक रिकर्सिव फ़ंक्शन कोड को समझने में आसान बनाता है
D.
Every recursive function must have a return value
प्रत्येक रिकर्सिव फ़ंक्शन का रिटर्न वैल्यू होना चाहिए
Question No# :
05
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# :
06
out of 50
Report Bug
Bookmark
The code block within every function starts with a ____ ?
प्रत्येक फंक्शन के भीतर एक कोड ब्लॉक ... से शुरू होता है?
A.
;
;
B.
: :
: :
C.
:
:
D.
%
%
Question No# :
07
out of 50
Report Bug
Bookmark
Which of the following functions accepts only integers as arguments?
निम्नलिखित में से कौन सा फंक्शन केवल इन्टिजर को आर्ग्यमन्ट के रूप में एक्सेप्ट करता है?
A.
ord()
ord()
B.
min()
min()
C.
chr()
chr()
D.
any()
any()
Question No# :
08
out of 50
Report Bug
Bookmark
How are variable length 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# :
09
out of 50
Report Bug
Bookmark
What is the length of sys.argv?
Sys.argv की लेंथ क्या है?
A.
number of arguments
number of arguments
B.
number of arguments + 1
number of arguments + 1
C.
number of arguments – 1
number of arguments – 1
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
10
out of 50
Report Bug
Bookmark
Which of these is not true about recursion?
इनमें से कौन सा रिकर्शन के बारे में सच नहीं है?
A.
Making the code look clean
कोड को साफ देखो
B.
A complex task can be broken into sub-problems
एक कॉम्प्लेक्स टास्क को सब-प्रॉब्लम्स में तोड़ा जा सकता है
C.
Recursive calls take up less memory
रिकर्सिव कॉल से मेमोरी कम लगती है
D.
Sequence generation is easier than a nested iteration
सीक्वेंस जनरेशन एक नेस्टेड पुनरावृत्ति की तुलना में आसान है
Question No# :
11
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# :
12
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# :
13
out of 50
Report Bug
Bookmark
Recursive function is
रिकर्सिव फंक्शन _______है
A.
A function that calls itself
एक फंक्शन जो स्वयं को कॉल करता है
B.
A function that calls other functions
एक फंक्शन जोअन्य कार्यो को कॉल करता है
C.
Both (A) and (B)
(A)और (B) दोनों
D.
None of the above
उपरोक्त में से कोई नहीं
Question No# :
14
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# :
15
out of 50
Report Bug
Bookmark
Structured program can be broken into to assign to more than one developer
एक से अधिक डेवलपर को असाइन करने के लिए संरचित प्रोग्राम को खंडित किया जा सकता है
A.
Segments
सेग्मेंट्स
B.
Modules
मॉडुल्स
C.
Units
यूनिट्स
D.
All the above
उपरोक्त सभी
Question No# :
16
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# :
17
out of 50
Report Bug
Bookmark
Which type of function calls itself directly or indirectly?
किस प्रकार का फंक्शन स्वयं को प्रत्यक्ष या अप्रत्यक्ष रूप से कॉल करता है?
A.
Lambda Function
Lambda Function
B.
Recursive Function
Recursive Function
C.
Anonymous Function
Anonymous Function
D.
Built-in Function
Built-in Function
Question No# :
18
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# :
19
out of 50
Report Bug
Bookmark
____ keyword used for function in python
पायथन में फ़ंक्शन के लिए कौन सा कीवर्ड उपयोग किया जाता है
A.
fun
fun
B.
function
function
C.
def
def
D.
define
define
Question No# :
20
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# :
21
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# :
22
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# :
23
out of 50
Report Bug
Bookmark
What is the main advantage of using functions?
फंक्शन का उपयोग करने का मुख्य लाभ क्या है?
A.
Increases code duplication
Increases code duplication
B.
Reduces code reusability
Reduces code reusability
C.
Promotes code reusability and modularity
Promotes code reusability and modularity
D.
Makes program slower
Makes program slower
Question No# :
24
out of 50
Report Bug
Bookmark
Which of the following is a unit of code that is often defined within a greater code structure?
A.
Subroutines
Subroutines
B.
Function
Function
C.
Files
Files
D.
Modules
Modules
Question No# :
25
out of 50
Report Bug
Bookmark
Which of the following functions is a built-in function in python?
निम्नलिखित में से कौन सा फ़ंक्शन पायथन में एक अंतर्निहित फ़ंक्शन है?
A.
seed()
सीड()
B.
sqrt()
sqrt()
C.
factorial()
फैक्टोरीअल()
D.
print()
प्रिंट ()
Question No# :
26
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# :
27
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# :
28
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# :
29
out of 50
Report Bug
Bookmark
The *args parameter stores arguments as:
*args पैरामीटर आर्गुमेंट्स को इस प्रकार स्टोर करता है:
A.
List
List
B.
Tuple
Tuple
C.
Dictionary
Dictionary
D.
Set
Set
Question No# :
30
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# :
31
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# :
32
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# :
33
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# :
34
out of 50
Report Bug
Bookmark
Which symbol is used for variable-length positional arguments?
चर-लंबाई वाले पोजीशनल आर्गुमेंट्स के लिए किस प्रतीक का उपयोग किया जाता है?
A.
#
#
B.
&
&
C.
*
*
D.
**
**
Question No# :
35
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# :
36
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# :
37
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# :
38
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# :
39
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# :
40
out of 50
Report Bug
Bookmark
A statement is used when a statement is required syntactically but you do not want any code to execute.
एक स्टेटमेंट का उपयोग तब किया जाता है जब किसी स्टेटमेंट को वाक्यात्मक रूप से आवश्यक होता है लेकिन आप नहीं चाहते कि कोई कोड निष्पादित हो।
A.
break
break
B.
pass
pass
C.
continue
continue
D.
none of these
इनमे से कोई नहीं
Question No# :
41
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
Question No# :
42
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# :
43
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# :
44
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# :
45
out of 50
Report Bug
Bookmark
Which of the following functions is a built-in function in pythonn
निम्न में से कौन सा फंक्शन पायथन में बिल्ट-इन फंक्शन है
A.
factorial()
factorial()
B.
print()
print()
C.
seed()
seed()
D.
sqrt()
sqrt()
Question No# :
46
out of 50
Report Bug
Bookmark
How many keyword arguments can be passed to a function in a single function call?
एक फ़ंक्शन कॉल में किसी फ़ंक्शन को कितने कीवर्ड आर्ग्यमन्ट दिए जा सकते हैं?
A.
zero
ज़ीरो
B.
one
एक
C.
zero or more
ज़ीरो या अधिक
D.
one or more
एक या अधिक
Question No# :
47
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# :
48
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# :
49
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# :
50
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
आइडेंटीफायर
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