Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : python - FUNCTIONS IN PYTHON
FUNCTIONS IN PYTHON
00:00:00
English
Hindi
Question No# :
01
out of 50
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# :
02
out of 50
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# :
03
out of 50
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# :
04
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">def foo(k): <br></span><span style="font-size: 14px; white-space: normal;"><span style="white-space:pre"> </span>k[0] = 1 <br></span><span style="font-size: 14px;">q = [0] <br></span><span style="font-size: 14px;">foo(q) <br></span><span style="font-size: 14px;">print(q)</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">def foo(k): <br></span><span style="font-size: 14px; white-space: normal;"><span style="white-space: pre;"> </span>k[0] = 1 <br></span><span style="font-size: 14px;">q = [0] <br></span><span style="font-size: 14px;">foo(q) <br></span><span style="font-size: 14px;">print(q)</span></pre>
A.
[0]
[0]
B.
[1]
[1]
C.
[1, 0]
[1, 0]
D.
[0, 1]
[0, 1]
Question No# :
05
out of 50
Which of the following functions does not throw an error?
निम्नलिखित में से कौन सा फंक्शन एरर नहीं देता है?
A.
ord()
ord()
B.
ord(‘ ‘)
ord(‘ ‘)
C.
ord(”)
ord(”)
D.
ord(“”)
ord(“”)
Question No# :
06
out of 50
<p>What will be the output of the following Python code?</p><pre>from math import factorial<br>print(math.factorial(5))</pre><div><br></div>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">from math import factorial<br>print(math.factorial(5))</pre>
A.
120
120
B.
Nothing is printed
कुछ भी प्रिंट नहीं होगा
C.
NameError: name 'math' is not defined
एरर मेथड फुक्टोरिअल मैथ मॉडयूल एकसिस्ट नहीं करता
D.
Error, the statement should be print factorial(5))
एरर स्टेटमेंट होनी चाहिए print(factorial(5 ))
Question No# :
07
out of 50
Debugging is the process of fixing a______in the software.
डिबगिंग सॉफ्टवेयर में ______ को ठीक करने की प्रक्रिया है।
A.
procedure
प्रकिया
B.
function
कार्य
C.
bug
बग
D.
None of these
इनमे से कोई नहीं
Question No# :
08
out of 50
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# :
09
out of 50
<p>What will be the output of following?</p><pre><span style="font-size: 14px;">Y=[2,5J,6]<br></span><span style="font-size: 14px;">Y.sort()</span></pre>
<p>निम्नलिखित का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">Y=[2,5J,6]<br></span><span style="font-size: 14px;">Y.sort()</span></pre>
A.
[2,6,5J]
[2,6,5J]
B.
[5J,2,6]
[5J,2,6]
C.
Error
Error
D.
[6,5J,2]
[6,5J,2]
Question No# :
10
out of 50
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# :
11
out of 50
Which of the following is a unit of code that is often defined within a greater code structure?
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# :
12
out of 50
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# :
13
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">def foo(fname, val):<br></span><span style="font-size: 14px;"> print(fname(val))<br></span><span style="font-size: 14px;">foo(max, [1, 2, 3])<br></span><span style="font-size: 14px;">foo(min, [1, 2, 3])</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">def foo(fname, val):<br></span><span style="font-size: 14px;"> print(fname(val))<br></span><span style="font-size: 14px;">foo(max, [1, 2, 3])<br></span><span style="font-size: 14px;">foo(min, [1, 2, 3])</span></pre>
A.
3 1
3 1
B.
1 3
1 3
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
14
out of 50
<p>find the output of following code:</p><pre><span style="font-size: 14px;">def add(a,b):<br></span><span style="font-size: 14px;"> return(a+b)<br></span><span style="font-size: 14px;">print(add(3,4))</span></pre>
<p> निम्नलिखित कोड का आउटपुट :</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">def add(a,b):<br></span><span style="font-size: 14px;"> return(a+b)<br></span><span style="font-size: 14px;">print(add(3,4))</span></pre>
A.
4
4
B.
7
7
C.
9
9
D.
8
8
Question No# :
15
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">def foo():<br></span><span style="font-size: 14px;"> total += 1<br></span><span style="font-size: 14px;"> return total<br></span><span style="font-size: 14px;">total = 0<br></span><span style="font-size: 14px;">print(foo())</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">def foo():<br></span><span style="font-size: 14px;"> total += 1<br></span><span style="font-size: 14px;"> return total<br></span><span style="font-size: 14px;">total = 0<br></span><span style="font-size: 14px;">print(foo())</span></pre>
A.
0
0
B.
1
1
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
16
out of 50
<p>What will be the output of the following python code?</p><pre>def printMax(a,b):<br> if a>b:<br> print(a, "is maximum")<br> elif a==b:<br> print(a, "is equal to ",b)<br> else:<br> print(b, "is maximum")<br>printMax(3,4)</pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">def printMax(a,b):<br> if a>b:<br> print(a, "is maximum")<br> elif a==b:<br> print(a, "is equal to ",b)<br> else:<br> print(b, "is maximum")<br>printMax(3,4)</pre>
A.
3
3
B.
4
4
C.
4 is maximum
4 is maximum
D.
None of these
None of these
Question No# :
17
out of 50
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# :
18
out of 50
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# :
19
out of 50
<p>What will be the output of the following Python function?</p> <pre><span class="kw1" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 119,="" 0);="" font-weight:="" bold;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">import</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"=""> </span><span class="kw3" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(220,="" 20,="" 60);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">math<br></span><span class="kw2" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" green;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(abs</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="kw3" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(220,="" 20,="" 60);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">math</span><span style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51); font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;"="">.</span><span class="me1" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">sqrt</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">25</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">)</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">))</span></pre>
<p>निम्नलिखित Python फ़ंक्शन का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span class="kw1" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 119,="" 0);="" font-weight:="" bold;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">import</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);"> </span><span class="kw3" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(220,="" 20,="" 60);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">math<br></span><span class="kw2" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" green;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(abs</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="kw3" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(220,="" 20,="" 60);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">math</span><span lucida="" console",="" monospace;="" text-align:="" justify;"="" style="background-color: rgb(244, 244, 244); color: rgb(51, 51, 51);">.</span><span class="me1" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">sqrt</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">25</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">)</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">))</span></pre>
A.
Error
एरर
B.
-5
-5
C.
5
5
D.
5.0
5.0
Question No# :
20
out of 50
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# :
21
out of 50
what is Lambda function in python
पायथन में लैम्ब्डा फंक्शन क्या है ?
A.
A built-in Python function
एक अंतर्निहित पायथन फ़ंक्शन
B.
A one-line anonymous function
एक-पंक्ति वाला अनाम फ़ंक्शन
C.
Lambda is a function in python but user can not use it.
लैम्ब्डा पायथन में एक फंक्शन है लेकिन उपयोगकर्ता इसका उपयोग नहीं कर सकता।
D.
None of the above
उपर्युक्त में से कोई नहीं
Question No# :
22
out of 50
What arithmetic operators cannot be used with strings?
स्ट्रिंग्स के साथ क्या अर्थमैटिक ऑपरेटरों का यूज़ नहीं किया जा सकता है?
A.
+
+
B.
*
*
C.
-
-
D.
All of the mentioned
सभी का उल्लेख है
Question No# :
23
out of 50
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# :
24
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">def foo(x):<br></span><span style="font-size: 14px;"> x = ['def', 'abc']<br></span><span style="font-size: 14px;"> return id(x)<br></span><span style="font-size: 14px;">q = ['abc', 'def']<br></span><span style="font-size: 14px;">print(id(q) == foo(q))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">def foo(x):<br></span><span style="font-size: 14px;"> x = ['def', 'abc']<br></span><span style="font-size: 14px;"> return id(x)<br></span><span style="font-size: 14px;">q = ['abc', 'def']<br></span><span style="font-size: 14px;">print(id(q) == foo(q))</span></pre>
A.
True
सही
B.
False
गलत
C.
None
None
D.
Error
एरर
Question No# :
25
out of 50
<p>What is the return type of following function ?</p><pre>def func1():<br> return 'mnp',22<br>print(type(func1()))</pre>
<p>निम्नलिखित फंक्शन का रिटर्न प्रकार क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">def func1():<br> return 'mnp',22<br>print(type(func1()))</pre>
A.
List
List
B.
Dictionary
Dictionary
C.
String
String
D.
Tuple
Tuple
Question No# :
26
out of 50
Which keyword is used for function in Python language?
पायथन भाषा में फंक्शन के लिए कौन सा कीवर्ड प्रयोग किया जाता है?
A.
function
function
B.
def
def
C.
fun
fun
D.
define
define
Question No# :
27
out of 50
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# :
28
out of 50
Where is function defined?
फंक्शन को कहां डिफाइन किया जाता है?
A.
In Module
मॉड्यूल
B.
In Class
क्लास
C.
In Another function
एक और फंक्शन
D.
All of these
उपर्युक्त सभीं
Question No# :
29
out of 50
<p>What will be the output of the following Python function?</p><pre><span style="font-size: 14px;">min(max(False,-3,-4), 2,7)</span></pre>
<p>निम्नलिखित Python फ़ंक्शन का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">min(max(False,-3,-4), 2,7)</span></pre>
A.
2
2
B.
False
गलत
C.
-3
-3
D.
-4
-4
Question No# :
30
out of 50
<p>Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">fun1(25, 75, 55)<br>fun1(10, 20)</pre>
<p style="font-size: 12.6px; letter-spacing: 0.14px;">fun1() का सही फंक्शन डिक्लेरेशन चुनें ताकि हम निम्नलिखित दो फंक्शन कॉल्स को सफलतापूर्वक निष्पादित कर सकें।</p><pre>fun1(25, 75, 55)<br>fun1(10, 20)</pre>
A.
def fun1(**kwargs)
def fun1(**kwargs)
B.
def fun1(args*)
def fun1(args*)
C.
No, it is not possible in Python
No, it is not possible in Python
D.
def fun1(*data)
def fun1(*data)
Question No# :
31
out of 50
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# :
32
out of 50
<p>What will be the output of the following code snippet?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">numbers = (4, 7, 19, 2, 89, 45, 72, 22)<br>sorted_numbers = sorted(numbers)<br>odd_numbers = [x for x in sorted_numbers if x% 2!=0]<br>print(odd_numbers)</pre>
<p>निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?</p><pre>numbers = (4, 7, 19, 2, 89, 45, 72, 22)<br>sorted_numbers = sorted(numbers)<br>odd_numbers = [x for x in sorted_numbers if x% 2!=0]<br>print(odd_numbers)</pre><div><br></div>
A.
[7, 19, 45, 89]
[7, 19, 45, 89]
B.
[2, 4, 22, 72]
[2, 4, 22, 72]
C.
[4, 7, 19, 2, 89, 45, 72, 22]
[4, 7, 19, 2, 89, 45, 72, 22]
D.
[24, 7, 19, 22, 45, 72, 89]
[24, 7, 19, 22, 45, 72, 89]
Question No# :
33
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print("xyyzxyzxzxyy".count('yy'))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print("xyyzxyzxzxyy".count('yy'))</span></pre>
A.
2
2
B.
0
0
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
34
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 12.6px;">example = "helle" print(example.rfind("e"))</span><br></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style=""><span style="font-size: 12.6px;">example = "helle" print(example.rfind("e"))</span><span style="font-size: 12.6px; letter-spacing: 0.14px;"><br></span></pre>
A.
1
1
B.
2
2
C.
4
4
D.
5
5
Question No# :
35
out of 50
<p>What will be the output of the following Python function?</p><pre><span style="font-size: 14px;">len(["hello",2, 4, 6])</span></pre>
<p>निम्नलिखित Python फ़ंक्शन का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">len(["hello",2, 4, 6])</span></pre>
A.
4
4
B.
3
3
C.
Error
एरर
D.
6
6
Question No# :
36
out of 50
<p>What will be the output of the following Python expression?</p> <pre><span class="kw2" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" green;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(round</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">4.5676</span><span class="sy0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">,</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">2</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">)<font color="#333333"><span style="background-color: rgb(244, 244, 244);">)</span></font></span></pre>
<p>निम्नलिखित Python एक्सप्रेशन का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span class="kw2" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" green;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(round</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">4.5676</span><span class="sy0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(102,="" 204,="" 102);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">,</span><span class="nu0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">2</span><span class="br0" lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">)<font color="#333333"><span style="background-color: rgb(244, 244, 244);">)</span></font></span></pre>
A.
4.5
4.5
B.
4.6
4.6
C.
4.57
4.57
D.
4.56
4.56
Question No# :
37
out of 50
The small sections of code that are used to perform a particular task is called
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# :
38
out of 50
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# :
39
out of 50
<p>What is the output of the following code ?</p><pre><span style="font-size: 14px;">def disp(*arg):<br></span><span style="font-size: 14px;"> for i in arg:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;">disp(name="Rajat", age="20")</span></pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">def disp(*arg):<br></span><span style="font-size: 14px;"> for i in arg:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;">disp(name="Rajat", age="20")</span></pre>
A.
TypeError
TypeError
B.
Rajat 20
Rajat 20
C.
Name age
Name age
D.
None of these
None of these
Question No# :
40
out of 50
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# :
41
out of 50
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# :
42
out of 50
The code block within every function starts with a ____ ?
प्रत्येक फंक्शन के भीतर एक कोड ब्लॉक ... से शुरू होता है?
A.
;
;
B.
: :
: :
C.
:
:
D.
%
%
Question No# :
43
out of 50
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# :
44
out of 50
<p>What will be the output of the following?</p><pre>def iq(a,b):<br> if(a==0):<br> return b<br> else:<br> return iq(a-1,a+b)<br>print(iq(3,6))</pre>
<p>निम्नलिखित का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">def iq(a,b):<br> if(a==0):<br> return b<br> else:<br> return iq(a-1,a+b)<br>print(iq(3,6))</pre>
A.
9
9
B.
10
10
C.
11
11
D.
12
12
Question No# :
45
out of 50
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# :
46
out of 50
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# :
47
out of 50
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# :
48
out of 50
<p>What is the output of this code?</p><pre>def calc(x):<br> r=2*x**2<br> return r<br>print(calc(5))</pre>
<p>इस कोड का आउटपुट क्या होगा</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">def calc(x):<br> r=2*x**2<br> return r<br>print(calc(5))</pre><p> </p>
A.
Error
Error
B.
50
50
C.
100
100
D.
20
20
Question No# :
49
out of 50
<p>What is the output of the following</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">y='klmn'<br>for i in range(len(y)):<br> print(y)</pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre>y='klmn'<br>for i in range(len(y)):<br> print(y)</pre><div><br></div>
A.
klmn klmn klmn klmn
klmn klmn klmn klmn
B.
k
k
C.
kkk
kkk
D.
None of the these
इनमे से कोई नहीं
Question No# :
50
out of 50
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
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