O Level Online Exam
Menu mobile
Home
MCQ Topic Wise
INFORMATION TECHNOLOGY TOOLS AND NETWORK BASIS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Online Mock Test
INFORMATION TECHNOLOGY TOOLS AND NETWORK BASIS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Old Papers
Practical Questions
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
Which of the following data structures is returned by the functions globals() and locals()?
निम्नलिखित में से कौन सा डेटा स्ट्रक्चर फंक्शन ग्लोबल्स () और लोकल लोगों () द्वारा रिटर्न की जाती है?
A.
list
लिस्ट
B.
set
सेट
C.
dictionary
डिक्शनरी
D.
tuple
टपल
Question No# :
02
out of 50
Report Bug
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# :
03
out of 50
Report Bug
Which of the following functions does not throw an error?
निम्नलिखित में से कौन सा फंक्शन एरर नहीं देता है?
A.
ord()
ord()
B.
ord(‘ ‘)
ord(‘ ‘)
C.
ord(”)
ord(”)
D.
ord(“”)
ord(“”)
Question No# :
04
out of 50
Report Bug
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# :
05
out of 50
Report Bug
The variables in a function definition are called as
A.
Subroutines
Subroutines
B.
Function
Function
C.
Definition
Definition
D.
Parameters
Parameters
Question No# :
06
out of 50
Report Bug
Which of the following functions accepts only integers as arguments?
निम्नलिखित में से कौन सा फंक्शन केवल इन्टिजर को आर्ग्यमन्ट के रूप में एक्सेप्ट करता है?
A.
ord()
ord()
B.
min()
min()
C.
chr()
chr()
D.
any()
any()
Question No# :
07
out of 50
Report Bug
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
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# :
09
out of 50
Report Bug
Which of the following functions does not necessarily accept only iterables as arguments?
निम्नलिखित में से कौन सा फंक्शन केवल नेससेरली को आर्ग्यमन्ट के रूप में एक्सेप्ट नहीं करता है?
A.
enumerate()
इनूमरेट()
B.
all()
ऑल()
C.
chr()
chr()
D.
max()
मैक्स()
Question No# :
10
out of 50
Report Bug
What is the type of each element in sys.argv?
Sys.argv में प्रत्येक एलिमेंट्स का प्रकार क्या है?
A.
set
सेट
B.
list
लिस्ट
C.
tuple
टपल
D.
string
स्ट्रिंग
Question No# :
11
out of 50
Report Bug
What happens if the base condition isn’t defined in recursive programs?
यदि रिकर्सिव फ़ंक्शन में बेस की कंडीशन को डिफाइन नहीं किया जाता है तो क्या होता है?
A.
Program gets into an infinite loop
प्रोग्राम एक इन्फनिट लूप में जाता है
B.
Program runs once
प्रोग्राम एक बार चलता है
C.
Program runs n number of times where n is the argument given to the function
प्रोग्राम n की नंबर को चलाता है जहां n फ़ंक्शन के लिए दिया गया आर्ग्यमन्ट है
D.
An exception is thrown
एक एक्सेप्शन फेंक दिया जाता है
Question No# :
12
out of 50
Report Bug
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# :
13
out of 50
Report Bug
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# :
14
out of 50
Report Bug
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# :
15
out of 50
Report Bug
print(0xA + 0xB + 0xC)
A.
0xA0xB0xC
0xA0xB0xC
B.
Error
एरर
C.
0x22
0x22
D.
33
33
Question No# :
16
out of 50
Report Bug
Which of the following are mandatory to write the type annotations in the function definition?
A.
Curly braces
Curly braces
B.
Parentheses
Parentheses
C.
Square brackets
Square brackets
D.
indentations
indentations
Question No# :
17
out of 50
Report Bug
How is a function declared 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# :
18
out of 50
Report Bug
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# :
19
out of 50
Report Bug
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# :
20
out of 50
Report Bug
The functions which cause side effects to the arguments passed are called
A.
impure function
impure function
B.
Partial Functions
Partial Functions
C.
Dynamic Functions
Dynamic Functions
D.
Pure functions
Pure functions
Question No# :
21
out of 50
Report Bug
What is the type of sys.argv?
Sys.argv का प्रकार क्या है?
A.
set
सेट
B.
list
लिस्ट
C.
tuple
टपल
D.
string
स्ट्रिंग
Question No# :
22
out of 50
Report Bug
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# :
23
out of 50
Report Bug
Debugging is the process of fixing a______in the software.
डिबगिंग सॉफ्टवेयर में ______ को ठीक करने की प्रक्रिया है।
A.
procedure
प्रकिया
B.
function
कार्य
C.
bug
बग
D.
None of these
इनमे से कोई नहीं
Question No# :
24
out of 50
Report Bug
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# :
25
out of 50
Report Bug
Which of these is not true about recursion?
इनमें से कौन सा रिकर्शन के बारे में सच नहीं है?
A.
It’s easier to code some real-world problems using recursion than non-recursive equivalent
नॉन-रिकर्सिव समकक्ष की तुलना में रिकर्शन का यूज़ करके कुछ रियल-वर्ल्ड की प्रॉब्लम्स को कोड करना आसान है
B.
Recursive functions are easy to debug
रिकर्सिव फ़ंक्शन को डीबग करना आसान है
C.
Recursive calls take up a lot of memory
रिकर्सिव कॉल बहुत सारी मेमोरी लेती हैं
D.
Programs using recursion take longer time than their non-recursive equivalent
रिकर्शन का यूज़ करने वाले प्रोग्राम अपने नॉन-रिकर्सिव समकक्ष की तुलना में अधिक समय लेते हैं
Question No# :
26
out of 50
Report Bug
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# :
27
out of 50
Report Bug
The sequence logic will not be used while
____के समय सीक्वेंस लॉजिक का उपयोग नहीं किया जाएगा|
A.
Subtracting two numbers
दो संख्याओं को घटने
B.
Comparing two data values
दो डेट मनो की तुलना करने
C.
Providing output to the user
उपयोगकर्ता को आउटपुट प्रदान करने
D.
Adding two numbers
दो नंबर जोड़ना
Question No# :
28
out of 50
Report Bug
The code block within every function starts with a ____ ?
प्रत्येक फंक्शन के भीतर एक कोड ब्लॉक ... से शुरू होता है?
A.
;
;
B.
: :
: :
C.
:
:
D.
%
%
Question No# :
29
out of 50
Report Bug
____ 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# :
30
out of 50
Report Bug
What will be the output of the “hello” +1+2+3?
A.
hello123
हेलो 123
B.
hello
हेलो
C.
Error
एरर
D.
hello6
हेलो6
Question No# :
31
out of 50
Report Bug
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# :
32
out of 50
Report Bug
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# :
33
out of 50
Report Bug
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# :
34
out of 50
Report Bug
What is the length of sys.argv?
Sys.argv की लेंथ क्या है?
A.
number of arguments
आर्ग्यमन्ट के नंबर
B.
number of arguments + 1
आर्ग्यमन्ट के नंबर+ 1
C.
number of arguments – 1
आर्ग्यमन्ट के नंबर – 1
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
35
out of 50
Report Bug
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# :
36
out of 50
Report Bug
What is the default value of encoding in encode()?
एन्कोड () में एन्कोडिंग का डिफ़ॉल्ट वैल्यू क्या है?
A.
ascii
ascii
B.
qwerty
qwerty
C.
utf-8
utf-8
D.
utf-16
utf-16
Question No# :
37
out of 50
Report Bug
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# :
38
out of 50
Report Bug
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# :
39
out of 50
Report Bug
What will be displayed by print(ord(‘b’) – ord(‘a’))?
प्रिंट (ord (‘b)) - ord () a’)) क्या डिस्प्ले करेगा?
A.
0
0
B.
1
1
C.
-1
-1
D.
2
2
Question No# :
40
out of 50
Report Bug
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# :
41
out of 50
Report Bug
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# :
42
out of 50
Report Bug
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# :
43
out of 50
Report Bug
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# :
44
out of 50
Report Bug
Where are the arguments received from the command line stored?
कमांड लाइन से रिसीव्ड आर्ग्यमन्ट कहाँ स्टोर्ड हैं?
A.
sys.argv
sys.argv
B.
os.argv
os.argv
C.
argv
argv
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
45
out of 50
Report Bug
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# :
46
out of 50
Report Bug
which function do you use to read a string?
एक स्ट्रिंग को रीड के लिए आप किस फ़ंक्शन का यूज़ करते हैं?
A.
input(“Enter a string”)
input(“Enter a string”)
B.
eval(input(“Enter a string”))
eval(input(“Enter a string”))
C.
enter(“Enter a string”)
enter(“Enter a string”)
D.
eval(enter(“Enter a string”))
eval(enter(“Enter a string”))
Question No# :
47
out of 50
Report Bug
Which of the following functions is a built-in function in python?
निम्नलिखित में से कौन सा फ़ंक्शन पायथन में एक अंतर्निहित फ़ंक्शन है?
A.
seed()
सीड()
B.
sqrt()
sqrt()
C.
factorial()
फैक्टोरीअल()
D.
print()
प्रिंट ()
Question No# :
48
out of 50
Report Bug
What is a variable defined outside a function referred to as ?
किसी फ़ंक्शन के बाहर परिभाषित वेरिएबल को क्या कहते है?
A.
A static variable
एक स्थिर वेरिएबल
B.
A global variable
एक वैश्विक वेरिएबल
C.
A local variable
एक स्थानीय वेरिएबल
D.
An automatic variable
एक स्वचालित वेरिएबल
Question No# :
49
out of 50
Report Bug
What arithmetic operators cannot be used with strings?
स्ट्रिंग्स के साथ क्या अर्थमैटिक ऑपरेटरों का यूज़ नहीं किया जा सकता है?
A.
+
+
B.
*
*
C.
–
–
D.
All of the mentioned
सभी का उल्लेख है
Question No# :
50
out of 50
Report Bug
Which of the following is a distinct syntactic block?
A.
Subroutines
Subroutines
B.
Function
Function
C.
Definition
Definition
D.
Modules
Modules
CCC Online Test
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Online Exam Quiz
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Best Website and Software Company in Allahabad
Website development Company in Allahabad