Chapter 6 Functions
Chapter 6 Functions
Chapter [6]
Function
In Python
LESSION 6 OF 9
Contact Us
JOIN US ON for Free Course +91-9027902171
Q1. Which of the following is true about functions in Python?
पायथन में फ़ंक्शन के बारे में ननम्नलिखित में से कौन सा सत्य है?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q2. Which keyword is used for function?
(A) Fun
(B) Define
(C) def
(D) Function
Contact Us
JOIN US ON for Free Course +91-9027902171
Q3. In a program, a function can be called _____ times.
नकसी प्रोग्राम में, नकसी फ़ंक्शन को _____ बार कॉि नकया जा सकता है।
(A) 3
(B) 2
(C) 5
Contact Us
JOIN US ON for Free Course +91-9027902171
Q4. Which are the advantages of functions in Python?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q5. What are the two main types of functions?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q6. Where is a function defined?
(A) Module
(B) Class
Contact Us
JOIN US ON for Free Course +91-9027902171
Q7. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q8. Functions which are already defined in Python are called?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q9. What will be the output of the following Python code?
(A) 48 y=6
(B) 14 z = lambda x: x * y
print(z(8))
(C) 64
Contact Us
JOIN US ON for Free Course +91-9027902171
Q10. What is a variable defined outside a function referred to as?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q11. Write the output of the following:
(D) 24 s = cal(9, 8)
print(s)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q12. What is a variable defined inside a function referred to as?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q13. What is the output of the following:
Contact Us
JOIN US ON for Free Course +91-9027902171
Q14. What is the output of the following:
(D) 3
Contact Us
JOIN US ON for Free Course +91-9027902171
Q15. Functions which do not return any value are called:
ऐसे फ़ंक्शन जो कोई मान नहीं िौटाते हैं उन्हें क्या कहा जाता है?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q16. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q17. The return statement in function is used to:
फ़ंक्शन में ररटनड स्टेटमेंट का उपयोग नकसके लिए नकया जाता है?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q18. The part of the program where a variable is accessible is known as the
____ of that variable.
प्रोग्राम का वह भाग जहााँ कोई वैररएबि पहाँच योग्य होता है, उस वैररएबि का ____ कहिाता है।
(A) scope
(B) module
(C) part
Contact Us
JOIN US ON for Free Course +91-9027902171
Q19. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q20. How many keyword arguments can be passed to a function in a single
function call? एक फ़ंक्शन कॉि में फ़ंक्शन को नकतने कीवर्ड तकड पास नकए जा सकते हैं?
(A) zero
(B) one
Contact Us
JOIN US ON for Free Course +91-9027902171
Q21. Write the output of the following:
Contact Us
JOIN US ON for Free Course +91-9027902171
Q22. Write the output of the following: ननम्नलिखित का आउटपुट लििें:
Contact Us
JOIN US ON for Free Course +91-9027902171
Q23. Which module in the python standard library parses options received
from the command line?
पायथन स्टैंर्र्ड िाइब्रेरी में कौन सा मॉड्यूि कमा़ंर् िाइन से प्राप्त षवक्पों को पासड करता है?
(A) getopt
(B) os
(C) getarg
(D) main
Contact Us
JOIN US ON for Free Course +91-9027902171
Q24. What is the type of `sys.argv`?
(A) set
(B) list
(C) tuple
(D) string
Contact Us
JOIN US ON for Free Course +91-9027902171
Q25. What is the value stored in `sys.argv[0]`?
(A) null
Contact Us
JOIN US ON for Free Course +91-9027902171
Q26. What will be the output of the following Python code?
(A) Error
def f1():
(B) 12 x = 15
(C) 15 print(x)
x = 12
(D) 1512
f1()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q27. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q28. What will be the output of the following Python code?
(A) Error x = 12
def f1(a, b=x):
(B) 12 4
print(a, b)
(C) 4 12 x = 15
(D) 4 15 f1(4)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q29. Which of these is not true about recursion?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q30. What will be the output of the following code?
(D) 6
Contact Us
JOIN US ON for Free Course +91-9027902171
Q31. What will be the output of the following code?
(D) 14
Contact Us
JOIN US ON for Free Course +91-9027902171
Q32. What is the output of the following code snippet?
(A) hello
(C) hel
(D) HELLO
Contact Us
JOIN US ON for Free Course +91-9027902171
Q33. What is the output of the following Python code?
Y = [2,5J,6]
Y.sort()
(B) [5J, 2, 6]
(D) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q34. What is the output of the following code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q35. What is the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q36. What is the interval of the value generated by the function
(C) [0,1]
(D) [0,1)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q37. What is the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q38. Which of the following are valid string manipulation functions in
Python?
(A) count()
(B) upper()
(C) strip()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q39. Which of the following will run without errors?
(A) round(45.8)
(C) round()
(D) round(7463.123, 2, 1)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q40. What will be the output after the following statements?
(A) m m = 18
(B) nop def nop():
print(m)
(C) 18
nop()
(D) Mnop
Contact Us
JOIN US ON for Free Course +91-9027902171
Q41. What will be the output of the following Python code snippet?
print('abef'.partition('cd'))
(A.) ('abef')
(D.) error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q42. What will be the output of the following Python code snippet?
print('abcdef12'.replace('cd', '12'))
(A.) ab12ef12
(B.) abcdef12
(C.) ab12efcd
Contact Us
JOIN US ON for Free Course +91-9027902171
Q43. What will be the output of the following Python code snippet?
print('abcefd'.replace('cd', '12'))
(A.) ab1ef2
(B.) abcefd
(C.) ab1efd
(D.) ab12ed2
Contact Us
JOIN US ON for Free Course +91-9027902171
Q44. What will be the output of the following Python code snippet?
(A.) xyxyxyxyxyxyxyxxy
(B.) 12y12y1212x12
(D.) error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q45. What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd'))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q46. What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd', 0))
(A.) ['abcdefcdghcd']
(B.) 'abcdefcdghcd'
(C.) error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q47. What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd', -1))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q48. What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd', 2))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q49. What will be the output of the following Python code snippet?
print('ab\ncd\nef'.splitlines())
Contact Us
JOIN US ON for Free Course +91-9027902171
Q50. What will be the output of the following Python function?
(A.) True
(B.) False
(C.) Error
(D.) 4>2
Contact Us
JOIN US ON for Free Course +91-9027902171
Q51. ननम्नलिखित में से कौन सा कोर् का एक यूननट है जजसे अक्सर एक बडे कोर् स्ट्रक्चर के
भीतर पररभाषित नकया जाता है?
(A.) Subroutines
(B.) Function
(C.) Files
(D.) Modules
Contact Us
JOIN US ON for Free Course +91-9027902171
Q52. ननम्नलिखित में से कौन सा एक षवलर्ष्ट वाक्यात्मक ब्लॉक है?
(A.) Subroutines
(B.) Function
(C.) Definition
(D.) Modules
Contact Us
JOIN US ON for Free Course +91-9027902171
Q53. What will be the output of the following Python function?
print('ab cd-ef'.title())
(A.) Ab cd-ef
(B.) Ab Cd-ef
(C.) Ab Cd-Ef
Contact Us
JOIN US ON for Free Course +91-9027902171
Q54. The variables in a function definition are called:
एक फ़ंक्शन पररभािा में वेररएबल्स को क्या कहा जाता है?
(A.) Subroutines
(B.) Function
(C.) Definition
(D.) Parameters
Contact Us
JOIN US ON for Free Course +91-9027902171
Q55. The values which are passed to a function definition are called:
वे वैल्यूज जो एक फ़ंक्शन पररभािा को पास की जाती हैं उन्हें क्या कहा जाता है?
(A.) Arguments
(B.) Subroutines
(C.) Function
(D.) Definition
Contact Us
JOIN US ON for Free Course +91-9027902171
Q56. Which of the following are mandatory to write the type annotations in
the function definition?
फ़ंक्शन पररभािा में प्रकार एनोरेर्न लििने के लिए ननम्नलिखित में से कौन सा अननवायड है?
(B.) Parentheses
(D.) Indentations
Contact Us
JOIN US ON for Free Course +91-9027902171
Q57. वे फ़ंक्शन्स जो एक ही तकों को पास करने पर सटीक पररणाम देते हैं उन्हें क्या कहा जाता
है? The functions which will give exact result when the same arguments are
passed are called:
Contact Us
JOIN US ON for Free Course +91-9027902171
Q58. वे फ़ंक्शन्स जो पास नकए गए तकों पर साइर् इफेक्ट्स र्ािते हैं उन्हें क्या कहा जाता है?
The functions which cause side effects to the arguments passed are called:
Contact Us
JOIN US ON for Free Course +91-9027902171
Q59. ननम्नलिखित कोर् द्वारा नकतने ऩंबर हप्रिं ट नकए जाए़ं गे?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q60. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
x=3
eval('x^2’)
(A.) Error
(B.) 1
(C.) 9
(D.) 6
Contact Us
JOIN US ON for Free Course +91-9027902171
Q61. Function defined to achieve some task as per the programmer’s
requirement is called a प्रोग्रामर की आवश्यकताओ ़ं के अनुसार नकसी कायड को प्राप्त करने
के लिए पररभाषित फ़ंक्शन को .......... कहा जाता है।
Contact Us
JOIN US ON for Free Course +91-9027902171
Q62. What will be the output of the following code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q63. What will be the output of the following
example = "helle"
example.rfind("e")
(A) 1
(B) 2
(C) 4
(D) 5
Contact Us
JOIN US ON for Free Course +91-9027902171
Q64. What will be the output of the following Python code?
from math import *
floor(11.7)
(A) 12
(B) 11
(C) 11.0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q65. Python supports the creation of anonymous functions at runtime,
using a construct called ........... पायथन ........... नामक ननमाडण का उपयोग करके
रनटाइम पर अज्ञात कायों के ननमाडण का समथडन करता है।
(A) pi
(B) anonymous
(C) lambda
Contact Us
JOIN US ON for Free Course +91-9027902171
Q66. What is the output of the following code?
print(sum(1, 2, 3))
(A) 1
(B) 6
(C) 3
Contact Us
JOIN US ON for Free Course +91-9027902171
Q67. Given a string x = "hello" What is the output of x.count('l')?
(A) 1
(B) 2
(C) 0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q68. Choose the correct function declaration of func1() so that we can execute the
following two function calls successfully.
func1() की सही फ़ंक्शन घोिणा चुनें तानक हम ननम्नलिखित दो फ़ंक्शन कॉि को सफितापूवडक
ननष्पाहदत कर सकें।
func1(25, 75, 55)
(A) def fun1(kwargs)
func1(10, 20)
(B) def fun1(args*)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q70. To use a module in another module, you must import it using an ............ Statement
नकसी मॉड्यूि को दूसरे मॉड्यूि में उपयोग करने के लिए, आपको इसे ........... स्टेटमेंट का उपयोग करके इम्पोटड करना होगा।
(A) import
(B) include
Contact Us
JOIN US ON for Free Course +91-9027902171
Q71. ननम्नलिखित में से कौन सा फ़ंक्शन केवि नेसेसरीिी को आग्युडमन्ट के रूप में एक्से्ट नहीं करता है?
Which of the following functions does not necessarily accept only iterables as arguments?
(A.) enumerate()
(B.) all()
(C.) chr()
(D.) max()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q72. ननम्नलिखित पायथन कोर् खिपेट का आउटपुट क्या होगा?
print(lamb(5))
(A.) 15
(B.) 555
(C.) 125
Contact Us
JOIN US ON for Free Course +91-9027902171
Q73. मान िीजजए नक एक लिस्ट ऐसी है: l = [2,3,4] यहद हम इस लिस्ट को ररवसड ऑर्डर में हप्रिं ट करना चाहते हैं, तो
ननम्न में से नकस मेथर् का यूज़ नकया जाना चाहहए? 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?
(A.) reverse(l)
(B.) list(reverse([l]))
(C.) reversed(l)
(D.) list(reversed(l))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q74. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
float(' -12345\n')
(B.) -12345.0
(C.) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q75. जब कोई आग्युडमेन्ट पास नहीं नकया जाता हैं, तो ननम्नलिखित में से कौन से फ़ंक्शन में एरर आएगा?
Which of the following functions will not result in an error when no arguments are passed to it?
(A.) min()
(B.) divmod()
(C.) all()
(D.) float()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q76. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
hex(15)
(A.) f
(B.) 0xF
(C.) 0Xf
(D.) 0xf
Contact Us
JOIN US ON for Free Course +91-9027902171
Q77. ननम्नलिखित में से कौन सा फ़ंक्शन एरर नहीं देता है?
(A.) ord()
(C.) ord('')
(D.) ord("")
Contact Us
JOIN US ON for Free Course +91-9027902171
Q78. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
len(["hello", 2, 4, 6])
(A.) 4
(B.) 3
(C.) Error
(D.) 6
Contact Us
JOIN US ON for Free Course +91-9027902171
Q79. Sys.argv में प्रत्येक एलिमें्स का प्रकार क्या है?
(A.) set
(B.) list
(C.) tuple
(D.) string
Contact Us
JOIN US ON for Free Course +91-9027902171
80. Sys.argv की िम्बाई क्या है?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q81. Which of the following functions is a built-in function in Python?
(A) factorial()
(B) print()
(C) seed()
(D) sqrt()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q1. What will be the output after the following statements?
(D) 9
Contact Us
JOIN US ON for Free Course +91-9027902171
Q2. What will be the output after the following statements?
(D) 225
Contact Us
JOIN US ON for Free Course +91-9027902171
Q3. What will be the output after the following statements?
return m * n
print(abc(7, 3))
(A) 21
(B) 7, 3
(C) (7, 3)
(D) m * n
Contact Us
JOIN US ON for Free Course +91-9027902171
Q4. What will be the output after the following statements?
return m / n
o = p(50, 5)
print(o)
(A) 5
(B) 50 / 5
(C) 10.0
(D) 10
Contact Us
JOIN US ON for Free Course +91-9027902171
Q5. What will be the output after the following statements?
print(m m n)
abc(14, 5)
(A) (14, 5)
(B) -5
(C) m n
(D) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q6. What will be the output after the following statements?
print(m * n % 10 + o)
abc()
(A) 150
(B) 155
(C) 1.0
(D) 225
Contact Us
JOIN US ON for Free Course +91-9027902171
Q7. What will be the output after the following statements?
m = lambda n: n 3
print(m(6))
(A) 6
(B) 18
(C) 36
(D) 216
Contact Us
JOIN US ON for Free Course +91-9027902171
Q8. What will be the output of the following statements?
import math
print(math.floor(67.3))
(A) 67
(B) 68
(C) 67.0
(D) 68.0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q9. What will be the output of the following statements?
import math
print(math.ceil(21.4))
(A) 21
(B) 22
(C) 21.0
(D) 22.0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q10. What will be the output of the following statements?
import math
print(math.sqrt(4))
(A) 2.1
(B) 2
(C) 2.0
(D) 4.0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q11. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
x = abs(math.sqrt(25))
print(x)
(A) Error
(B) -5
(C) 5
(D) 5.0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q12. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
sum(2, 4, 6)
sum([1, 2, 3])
(A) Error, 6
(C) 12, 6
Contact Us
JOIN US ON for Free Course +91-9027902171
Q13. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
all([3, 0, 4.2])
(A) True
(B) False
(C) Error
(D) 0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q14. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
(A) 2
(B) False
(C) -3
(D) -4
Contact Us
JOIN US ON for Free Course +91-9027902171
Q15. फ़ंक्शन complex() का आउटपुट क्या है?
complex()
(A) 0j
(B) 0 + 0j
(C) 0
(D) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q16. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
complex(1 + 2j)
(A) Error
(B) 1
(C) 2j
(D) 1 + 2j
Contact Us
JOIN US ON for Free Course +91-9027902171
Q17. ननम्नलिखित में से कौन सा फ़ंक्शन पायथन में एक अ़ं तननि हहत फ़ंक्शन है?
(A) seed()
(B) sqrt()
(C) factorial()
(D) print()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q18. फ़ंक्शन pow(x,y,z) का मूल्या़ंकन इस प्रकार है:
pow(x, y, z)
(A) (xy)z
(B) (xy) / z
(C) (xy) % z
(D) (xy) * z
Contact Us
JOIN US ON for Free Course +91-9027902171
Q19. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
all([2, 4, 0, 6])
(A) Error
(B) True
(C) False
(D) 0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q20. ननम्नलिखित पायथन एक्सप्रेर्न का आउटपुट क्या होगा?
round(4.5676, 2)
(A) 4.5
(B) 4.6
(C) 4.57
(D) 4.56
Contact Us
JOIN US ON for Free Course +91-9027902171
Q21. What will be the output of the following statements?
print(math.pow(3,2))
(A) 6
(B) 9
(C) 6.0
(D) 9.0
Contact Us
JOIN US ON for Free Course +91-9027902171
Q22. What does the following statements do?
print(datetime.datetime.today())
Contact Us
JOIN US ON for Free Course +91-9027902171
Q23. What does the following statements do?
print(getattr(datetime.today(), 'hour'))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q24. What does the following statements do?
print(getattr(datetime.today(), 'year'))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q25. What does the following statements do?
print(datetime.today().strftime('%A'))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q26. What does the following statements do?
print(datetime.today().strftime('%B'))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q27. What does the following statements do?
print(datetime.today().strftime('%d'))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q28. What will be the output of the following statements?
print(x.capitalize())
(A) Python
(B) Python.capitalize
(C) PYTHON
(D) Python
Contact Us
JOIN US ON for Free Course +91-9027902171
Q29. What will be the output of the following statements?
print(x.title())
Contact Us
JOIN US ON for Free Course +91-9027902171
Q30. What will be the output of the following statements?
print(x.upper())
फ़ंक्शन हेनर्िं ग में कीवर्ड आग्युडमेंट कैसे स्पेजसफाइर् नकए जाते हैं?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q32. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q33. What will be the output of the following Python code?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q34. Find the output of the following Python program.
Contact Us
JOIN US ON for Free Course +91-9027902171
Q35. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
(A) print(t[3])
(B) t[3] = 45
(C) print(max(t))
(D) print(len(t))
Contact Us
JOIN US ON for Free Course +91-9027902171
Q36. Which of the following statements is false about recursion?
(B) Infinite recursion can occur if the base case is not properly mentioned
Contact Us
JOIN US ON for Free Course +91-9027902171
Q37. The output of the following Python program is...
Contact Us
JOIN US ON for Free Course +91-9027902171
Q38. Recursive functions usually take __________ memory space than non-recursive functions.
ररकजसि व फ़ंक्शन आमतौर पर नॉन-ररकजसि व फ़ंक्शन की तुिना में __________ मेमोरी स्पेस िेते हैं।
(A) More
(B) Less
Contact Us
JOIN US ON for Free Course +91-9027902171
Q39. The __________ can be accessed only inside the function in which they are declared, whereas global variables can be accessed
throughout the program body by all functions.
__________ को केवि उस फ़ंक्शन के अ़ं दर एक्सेस नकया जा सकता है जजसमें वे घोषित नकए गए हैं, जबनक ग्लोबि वेररएबल्स को सभी फ़ंक्शन्स द्वारा पूरे प्रोग्राम बॉर्ी में
एक्सेस नकया जा सकता है।
(D) None
Contact Us
JOIN US ON for Free Course +91-9027902171
Q40. In-built function of Python is used to remove all the leading and trailing spaces from a string.
पायथन के इन-षबल्ट फ़ंक्शन का उपयोग एक स्टस्ट्ऱंग से सभी प्रमुि और अनुगामी ररक्त स्थान को हटाने के लिए नकया जाता है।
(A) lstrip()
(B) trail()
(C) strip()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q41. method returns `True` if all characters in the string are alphanumeric (either
alphabets or numbers). If not, it returns false. यहद स्टस्ट्ऱंग में सभी वणड अल्फान्यूमेररक (या तो अक्षर या
स़ंख्या) हैं, तो षवषि `True` ररटनड करता है यहद नहीं, तो यह false िौटाता है।
(A) isalphanum()
(B) isalnum()
(C) isalphannumeric()
(D) None
Contact Us
JOIN US ON for Free Course +91-9027902171
Q42. एक स्टस्ट्ऱंग को रीर् करने के लिए आप नकस फ़ंक्शन का उपयोग करते हैं?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q43. ननम्नलिखित पायथन कोर् का आउटपुट क्या होगा?
print("xyyzxyzxxyy".count('yy'))
(A) 2
(B) 0
(C) error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q44. __________ method calls the built-in Python help system.
(A) helpview()
(B) help()
(C) helpme()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q45. __________ method converts all uppercase characters to lowercase and vice versa of
the given string, and returns it. __________ षवषि सभी अपरकेस वणों को हदए गए स्टस्ट्ऱंग के िोअरकेस
और इसके षवपरीत में पररवषति त करती है, और इसे वापस करती है।
(A) uppertolower
(B) isUpper
(C) toUpper
(D) swapcase
Contact Us
JOIN US ON for Free Course +91-9027902171
Q46. What is the output of the following program?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q47. Function name and parameter list are part of function header.
(A) True
(B) False
Contact Us
JOIN US ON for Free Course +91-9027902171
Q48. The function used to find power of a number.
ऩंबर का पॉवर फाइ़ं र् करने के लिए नकस फ़ंक्शन का प्रयोग करते हैं।
(A) ``
(B) power()
(C) pow()
Contact Us
JOIN US ON for Free Course +91-9027902171
Q49. फ़ंक्शन के हेनर्िं ग में नर्फॉल्ट आग्युडमेंट कैसे स्पेजसफाइर् नकए जाते हैं?
(C) identifier followed by the default value within square brackets ([])
(D) identifier
Contact Us
JOIN US ON for Free Course +91-9027902171
Q50. ननम्नलिखित पायथन कोर् खिपेट का आउटपुट क्या होगा?
print('abc'.islower())
(A) True
(B) False
(C) None
(D) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q51. ननम्नलिखित पायथन कोर् खिपेट का आउटपुट क्या होगा?
print('Hello World'.istitle())
(A) True
(B) False
(C) None
(D) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q52. ननम्नलिखित पायथन कोर् का आउटपुट क्या होगा?
print('xyyzxxyyy'.lstrip('xyy'))
(A) error
(B) zxxyxyyy
(C) z
(D) zxxy
Contact Us
JOIN US ON for Free Course +91-9027902171
Q53. ननम्नलिखित पायथन कोर् खिपेट का आउटपुट क्या होगा?
print('Ab!2'.swapcase())
(A) AB!@
(B) ab12
(C) aB!2
(D) aB1@
Contact Us
JOIN US ON for Free Course +91-9027902171
Q54. ननम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
list(enumerate([2, 3]))
(A) Error
Contact Us
JOIN US ON for Free Course +91-9027902171
Q55. ननम्नलिखित पायथन कोर् का आउटपुट क्या होगा?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q56. ननम्नलिखित पायथन प्रोग्राम का आउटपुट क्या होगा?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q57. ननम्नलिखित कोर् का आउटपुट क्या है?
Contact Us
JOIN US ON for Free Course +91-9027902171
Q58. मेमोरी का कौन सा भाग जसस्टम फ़ंक्शन कॉि के पैरामीटर और स्थानीय चर को स़ंग्रहहत करता है?
Which part of the memory does the system store the parameter and local variables of a function
call?
(A) Heap
(B) Stack
Contact Us
JOIN US ON for Free Course +91-9027902171
Q59. ननम्नलिखित कोर् का आउटपुट क्या है?
(B) 9 a=a+b
(C) 5 print(a)
(D) 4 fun(5, 4)
Contact Us
JOIN US ON for Free Course +91-9027902171
Q60. ननम्नलिखित पायथन कोर् का आउटपुट क्या है?
(D) A B C D
Contact Us
JOIN US ON for Free Course +91-9027902171
THaNK You!
Contact Us
JOIN US ON for Free Course +91-9027902171