Functions in Python

1 / 148

The function pow(x,y,z) is evaluated as:

फ़ंक्शन pow(x,y,z) का मूल्यांकन इस प्रकार किया जाता है:

2 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(x):

x[0]=[‘def’]

x[1]=[‘abc’]

returned(x)

q=[‘abc’,’def’]

print(id(q)==foo(q))

3 / 148

what is a variable defined outside a function referred to as?
किसी फ़ंक्शन के बाहर परिभाषित वेरिएबल को क्या कहा जाता है?

4 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def writer():

title = 'Sir'

name = (lambda x:title + ' ' + x)

return name

who = writer()

who('Arthur')

5 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
odd=lambda x: bool(x%2)
numbers=[n for n in range(10)]
print(numbers)
n=list()
for i in numbers:
if odd(i):
continue;
else:
break;

6 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo():

total+=1

return=0

print(foo())

7 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f(x, y, z): return x + y + z

f(2, 30, 400)

8 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def change(i = 1, j = 2):

i = i + j

j = j + 1

print(i, j)

change(j = 1, i = 2)

9 / 148

what happens if the base condition isn’t defined in recursive program?
यदि recursive प्रोग्राम में बेस स्थिति परिभाषित नहीं की गई तो क्या होगा?

10 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def f():
x=4
x=1
f()

11 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(i,x=[]):

x.append(x.append(i))

return x

for i in range(3):

y=foo(i)

print(y)

12 / 148

what is the type of sys.argv?

Sys.Argv का प्रकार क्या है?

13 / 148

Which of the following is a feature of DocString?

निम्नलिखित में से कौन सी DocString की विशेषता है?

14 / 148

The function complex(‘2-3j’) is valid but the function complex(‘2 – 3j’) is invalid.

फ़ंक्शन complex(‘2-3j’) वैध है लेकिन फ़ंक्शन complex(‘2 – 3j’) अमान्य है।

15 / 148

recursion and iteration are the same programming approach
recursion और iteration एक ही प्रोग्रामिंग दृष्टिकोण हैं

16 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f1():

x=100

print(x)

x=+1

f1()

17 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

all([2,4,0,6])

18 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x=100

def f1():

global x

x=90

def f2():

global x

x=80

print(x)

19 / 148

What is called when a function is defined inside a class?

जब किसी क्लास के अंदर कोई फ़ंक्शन परिभाषित किया जाता है तो उसे क्या कहा जाता है?

20 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f1():

global x

x+=1

print(x)

x=12

print(“x”)

21 / 148

what is the length of sys.argv?

Sys.Argv की लंबाई क्या है?

22 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f1(a,b=[]):

b.append(a)

return b

print(f1(2,[3,4]))

23 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

lamb = lambda x: x ** 3

print(lamb(5))

24 / 148

Where is function defined?

फ़ंक्शन कहाँ परिभाषित किया गया है?

25 / 148

What is the output of the function complex()?

फंक्शन complex() का आउटपुट क्या है?

26 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

e=”butter”

def f(a):

print(a)+e

f(“bitter”)

27 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(fname,val):

print(fname(val))

foo(max,[1,2,3])

foo(min,[1,2,3])

28 / 148

which module in the python standard library parses options received from the command line?

पायथन स्टैंडर्ड लाइब्रेरी में कौन सा मॉड्यूल कमांड लाइन से प्राप्त विकल्पों को पार्स करता है?

29 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

min(max(False,-3,-4), 2,7)

30 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def sayHello():

print('Hello World!')

sayHello()

sayHello()

31 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x = 50

def func():

global x

print('x is', x)

x = 2

print('Changed global x to', x)

func()

print('Value of x is', x)

32 / 148

fill in the line of the following python code for calculating the factorial of a number
किसी संख्या के फैक्टोरियल की गणना करने के लिए निम्नलिखित पायथन कोड की पंक्ति भरें
def fact(num):
if num==0:
return 1
else:
return……

33 / 148

Which of the following functions will not result in an error when no arguments are passed to it?

निम्नलिखित में से कौन सा फ़ंक्शन तब त्रुटि उत्पन्न नहीं करेगा जब इसमें कोई तर्क पारित नहीं किया जाएगा?

34 / 148

what will be the output of the following python code and state the type of copy that is depicted?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा और दर्शाई गई कॉपी का प्रकार बताएं?
L1=[2,4,6,8]
L2=[1,2,3]
L1=l2
L2

35 / 148

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]। यदि हम इस सूची को उल्टे क्रम में प्रिंट करना चाहते हैं, तो निम्न में से कौन सी विधि का उपयोग किया जाना चाहिए?

36 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

ord(65)

ord(‘A’)

37 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

any([2>8, 4>2, 1>2])

38 / 148

What is a variable defined inside a function referred to as?

एक फ़ंक्शन के अंदर परिभाषित एक वैरिएबल क्या है?

39 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(k):

k=[1]

q=[0]

foo(q)

print(q)

40 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f1():

x=15

print(x)

x=12

f1()

41 / 148

Which are the advantages of functions in python?

पायथन में फ़ंक्शन के क्या लाभ हैं?

42 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def cube(x):
return x*x*x
x=cube(5)
print x

43 / 148

Lambda contains block of statements.

लैम्ब्डा में कथनों का ब्लॉक होता है।

44 / 148

What will be the output of the following Python functions?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

x=3

eval('x^2')

45 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def printMax(a, b):

if a > b:

print(a, 'is maximum')

elif a == b:

print(a, 'is equal to', b)

else:

print(b, 'is maximum')

printMax(3, 4)

46 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
A=[1,2,3,4,5]
B=lambda x:(b(x[1:])+x[:1]if x else[])
Print(b (a))

47 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
l1=[10,20,30,[4]]
l2=list(l1)
id(l1)==id(l2)

48 / 148

What is a variable defined outside a function referred to as?

एक फ़ंक्शन के बाहर एक वैरिएबल को परिभाषित किया गया है?

49 / 148

What will be the output of the following Python functions?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

chr(‘97’)

chr(97)

50 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x = 50

def func(x):

print('x is', x)

x = 2

print('Changed local x to', x)

func(x)

print('x is now', x)

51 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(k):

k[0]=1

q=[0]

foo(q)

print(q)

52 / 148

Which of the following refers to mathematical function?

निम्नलिखित में से कौन सा गणितीय फ़ंक्शन को संदर्भित करता है?

53 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

sum(2,4,6)

sum([1,2,3])

54 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def maximum(x,y):
if x>y:
return x
elif x==y:
return ‘the numbers are equal’
else:
return y
print(maximum(2,3))

55 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def fun(n):
if(n>100):
return n-5
return fun(fun(n+11)):
print(fun(45))

56 / 148

how many keyword arguments can be passed to a function in a single function call?

एक फ़ंक्शन कॉल में किसी फ़ंक्शन में कितने कीवर्ड तर्क दिए जा सकते हैं?

57 / 148

Does Lambda contains return statements?

क्या लैम्ब्डा में रिटर्न स्टेटमेंट्स शामिल हैं?

58 / 148

Python supports the creation of anonymous functions at runtime, using a construct called __________

पायथन __________ नामक निर्माण का उपयोग करके, रनटाइम पर अज्ञात फ़ंक्शन के निर्माण का समर्थन करता है

59 / 148

how are variable length arguments specified in the function heading?

फ़ंक्शन हेडिंग में वैरिएबल लंबाई एर्गुमेंट कैसे निर्दिष्ट किए जाते हैं?

60 / 148

how are keyword arguments specified in the function heading?

फ़ंक्शन हेडिंग में कीवर्ड तर्क कैसे निर्दिष्ट किए जाते हैं?

61 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x=1

def cg():

global x

x=x+1

cg()

62 / 148

what is the value stored in sys.argv[0]?

Sys.Argv [0] में संग्रहीत मान क्या है?

63 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

hex(15)

64 / 148

what happens if a local variable exists with the same name as the global variable you want to access?

यदि कोई स्थानीय वैरिएबल उस वैश्विक वैरिएबल के समान नाम के साथ मौजूद है जिसे आप एक्सेस करना चाहते हैं तो क्या होगा?

65 / 148

only problems that are recursively defined can be solved using recursion
केवल रिकर्सन रूप से परिभाषित समस्याओं को ही रिकर्सन का उपयोग करके हल किया जा सकता है

66 / 148

What will be the output of the following Python expression?

निम्नलिखित पायथन एक्सप्रेशन का आउटपुट क्या होगा?

round(4.576)

67 / 148

the nested list undergoes shallow copy even when the list as a whole undergoes deep copy
नेस्टेड सूची उथली प्रतिलिपि से गुजरती है, तब भी जब संपूर्ण सूची गहरी प्रतिलिपि से गुजरती है

68 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

complex(1+2j)

69 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x=12

def f1(a,b=x):

print(a,(b)

x=15

f1(4)

70 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def text(i,j):
if(i==0):
return j
else:
return test(i-1,i+j)
print(test(4,7)

71 / 148

what is the type of each element in sys.argv?

Sys.Argv में प्रत्येक एलिमेंट का प्रकार क्या है?

72 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(i,x=[]):

x.append(i)

return x

for i in range(3):

print(foo(i))

73 / 148

in …………..copy, the modification done on one list affects the other list. In…………copy, the modification done on one list does not affect the other list
…………..copy में, एक सूची में किया गया संशोधन दूसरी सूची को प्रभावित करता है। …………कॉपी में एक सूची में किये गये संशोधन से दूसरी सूची पर कोई प्रभाव नहीं पड़ता है

74 / 148

Which of the following is the use of id() function in python?

पायथन में id() फ़ंक्शन का उपयोग निम्नलिखित में से किसमें किया जाता है?

75 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f(x):

print(“outer”)

def f1(a):

print(“inner”)

print(a,x)

f(3)

f1(1)

76 / 148

where are the arguments received from the command line stored?

कमांड लाइन से प्राप्त अर्गुमेंट कहां स्टोर किए जाते हैं?

77 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

all(3,0,4.2)

78 / 148

directive %a represents
directive %a प्रतिनिधित्व करता है

79 / 148

Lambda is a statement.

लैम्ब्डा एक कथन है.

80 / 148

which of these is false about recursion?
रिकर्सन के बारे में इनमें से कौन सा गलत है?

81 / 148

named block of statements within a program is known as:
किसी प्रोग्राम के भीतर कथनों के नामित ब्लॉक को इस रूप में जाना जाता है:

82 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
l1=[10,20,30]
l1=11
id(l1)==id(l2)
l2=l1.copy()
id(l1)==id(l2)

83 / 148

which type of copy is shown in the following python code?
निम्नलिखित पायथन कोड में किस प्रकार की कॉपी दिखाई गई है?
l1=[[10,20,],[30,40],[50,60]]
ls=list(l1)
ls
[[10,20],[20,40],[50,60]]

84 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def cube(x):

return x * x * x

x = cube(3)

print x

85 / 148

which keyword is used for function?
फ़ंक्शन के लिए कौन सा कीवर्ड उपयोग किया जाता है?

86 / 148

which of the following is correct in respect of advantages of functions?
फ़ंक्शंस के फ़ायदों के संबंध में निम्नलिखित में से कौन सा सही है?

87 / 148

which of these is not true about recursion?
रिकर्सन के बारे में इनमें से कौन सा सत्य नहीं है?

88 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def power(x, y=2):

r = 1

for i in range(y):

r = r * x

return r

print power(3)

print power(3, 3)

89 / 148

where is function defined?
फ़ंक्शन कहां परिभाषित किया गया है?

90 / 148

observe the following python code?
निम्नलिखित पायथन कोड का अवलोकन करें?
def a(n):
if n==0:
return 0
else:
return n*a(n-1)
def b(n,tot):
if n==0:
return tot
else:
return b(n-2,tot-2)

91 / 148

Which of the following functions accepts only integers as arguments?

निम्नलिखित में से कौन सा फ़ंक्शन केवल पूर्णांकों को तर्क के रूप में स्वीकार करता है?

92 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

import math

abs(math.sqrt(25))

93 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

list(enumerate([2, 3]))

94 / 148

which if the most appropriate definition for recursion?
यदि रिकर्सन के लिए सबसे उपयुक्त परिभाषा कौन सी है?

95 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
f=lambda x:bool(x%2)
print(f(20),f(21))

96 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f1(x):

global x

x+=1

print(x)

f1(15)

print(“hello”)

97 / 148

read the following python code carefully and point out the global variables

निम्नलिखित पायथन कोड को ध्यान से पढ़ें और global variables को इंगित करें?

y,z=1,2

def f():

global x

x=y+z

98 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def a(b):

b = b + [5]

c = [1, 2, 3, 4]

a(c)

print(len(c))

99 / 148

a module
एक मॉड्यूल

100 / 148

Which of the following is the use of function in python?

पायथन में फ़ंक्शन का उपयोग निम्नलिखित में से कौन सा है?

101 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def say(message, times = 1):

print(message * times)

say('Hello')

say('World', 5)

102 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
l1=[10,20,30,[40]]
l2=copy.deepcopy(l1)
l1[3][0]=90
l1
l2

103 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f(p,q,r):

global s

p=10

q=20

r=30

s=40

print(p,q,r,s)

p,q,r,s=1,2,3,4

f(5,10,15)

104 / 148

What will be the output of the following Python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

i=0

def change(i):

i=i+1

return i

change(1)

print(i)

105 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
l=[]
def convert(b):
if(b==0):
return 1
dig=b%2
l.append(dig)
convert(b//2)
convert(6)
l.reverse()
for i in l:
print(i,end=””)

106 / 148

which of the following data structures is returned by the functions globals() and locals()?

निम्नलिखित में से कौन सी डेटा संरचना globals() और locals() फ़ंक्शन द्वारा लौटाई जाती है?

107 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def maximum(x, y):

if x > y:

return x

elif x == y:

return 'The numbers are equal'

else:

return y

print(maximum(2, 3))

108 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

y = 6

z = lambda x: x * y

print z(8)

109 / 148

……….returns a dictionary of the module name space. ………… returns a dictionary of the current namespace
……….मॉड्यूल नामस्थान का शब्दकोश लौटाता है। ………….वर्तमान नामस्थान का शब्दकोश लौटाता है

110 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

len(["hello",2, 4, 6])

111 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def a(n):
if n==0:
return 0
elif n==1:
return 1
else:
return a(n-1)+a(n-2)
for i in range(0,4):
print(a(i),end=””)

112 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def f():

global a

print(a)

a=”hello”

print(a)

a=”world”

f()

print(a)

113 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def find(a, **(b):

print(type(b))

find(‘letters’,A=’1’,B=’2’)

114 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo(x):

x=[‘def’,’abc’]

returned(x)

q=[‘abc’,’def’]

print(id(q)==foo(q))

115 / 148

if a function doesn’t have a return statement which of the following does the function return?
यदि किसी फ़ंक्शन में रिटर्न स्टेटमेंट नहीं है तो फ़ंक्शन निम्न में से क्या रिटर्न करता है?

116 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
x=50
def func(x):
print(‘x is’, x)
x=2
print(‘changed local x to’, x)
func(x)
print((‘x is now’, x)

117 / 148

how are default arguments specified in the function heading?

फ़ंक्शन शीर्षक में डिफ़ॉल्ट अर्गुमेंट कैसे निर्दिष्ट किए जाते हैं?

118 / 148

The function divmod(a,b), where both ‘a’ and ‘b’ are integers is evaluated as:

फ़ंक्शन divmod(a,b), जहाँ ‘a’ और ‘b’ दोनों पूर्णांक हैं, का मूल्यांकन इस प्रकार किया जाता है:

119 / 148

What will be the output of the following Python function?

निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?

divmod(10.5,5)

divmod(2.4,1.2)

120 / 148

Which of the following functions is a built-in function in python?

निम्नलिखित में से कौन सा फंक्शन पायथन में बिल्ट-इन फंक्शन है?

121 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
def check(n):
if n<2:
return n%2==0
return check(n-2)
print(check(11))

122 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def foo():

return total+1

total=0

print(foo())

123 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def func(a, b=5, c=10):

print('a is', a, 'and b is', b, 'and c is', c)

func(3, 7)

func(25, c = 24)

func(c = 50, a = 100)

124 / 148

Which of the following functions does not necessarily accept only iterables as arguments?

निम्नलिखित में से कौन सा फंक्शन आवश्यक रूप से केवल पुनरावृत्तीय (इटेरेबल) को ही तर्क के रूप में स्वीकार नहीं करता है?

125 / 148

which of the following statements is false about recursion?
निम्नलिखित में से कौन सा कथन रिकर्सन के बारे में गलत है?

126 / 148

which of the following is the use of function in python
पायथन में फ़ंक्शन का उपयोग निम्न में से कौन सा है

127 / 148

the ceil() returns………..whole number greater than or equal to x.
ceil() x से बड़ी या उसके बराबर पूर्ण संख्या लौटाता है।

128 / 148

What are the two main types of functions?

फ़ंक्शन के दो मुख्य प्रकार क्या हैं?

129 / 148

which of these is not true about recursion?
रिकर्सन के बारे में इनमें से कौन सा सत्य नहीं है?

130 / 148

the math.sqrt(49) returns

131 / 148

Which of the following functions does not throw an error?

निम्नलिखित में से कौन सा फ़ंक्शन त्रुटि उत्पन्न नहीं करता है?

132 / 148

which of the following refers to mathematical function?
निम्नलिखित में से कौन सा गणितीय फ़ंक्शन को संदर्भित करता है?

133 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
l1=[1,2,3,(4)]
l2=l1.copy()
l2
l1

134 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def display(b, n):

while n > 0:

print(b,end="")

n=n-1

display('z',3)

135 / 148

how are required arguments specified in the function heading?

फ़ंक्शन हिडिंग में आवश्यक अर्गुमेंट कैसे निर्दिष्ट किए जाते हैं?

136 / 148

on assigning a value to a variable inside a function, it automatically becomes a global variable

किसी फ़ंक्शन के अंदर किसी वेरिएबल को मान निर्दिष्ट करने पर, यह स्वचालित रूप से एक वैश्विक वैरिएबल बन जाता है

137 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
l=[2,3,[4,5]]
l2=l.copy()
l2[0]=88
l
l2

138 / 148

Which keyword is used for function?

फ़ंक्शन के लिए कौन सा कीवर्ड उपयोग किया जाता है?

139 / 148

what will be the output of the following python code?
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
a=10
globals()[‘a’=25
print(a)

140 / 148

in……..copy, the base address of the objects are copied in……….copy, the base address of the objects are not copied
……..कॉपी में, ऑब्जेक्ट का आधार पता कॉपी किया जाता है ……….कॉपी में, ऑब्जेक्ट का आधार पता कॉपी नहीं किया जाता है

141 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

x=5

def f1():

global x

x=4

def f2(a,(b):

global x

return a+b+x

f1()

total=f2(1,2)

print(total)

142 / 148

What will be the output of the following Python expression?

निम्नलिखित पायथन एक्सप्रेशन का आउटपुट क्या होगा?

round(4.5676,2)?

143 / 148

what will be the output of the following python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

def san(x):

print(x+1)

x=-2

x=4

san(12)

144 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

a=10

b=20

def change():

global b

a=45

b=56

change()

print(a)

print(b)

145 / 148

If a function doesn’t have a return statement, which of the following does the function return?

यदि किसी फ़ंक्शन के पास रिटर्न स्टेटमेंट नहीं है, तो निम्नलिखित में से कौन सा फ़ंक्शन वापस लौटता है?

146 / 148

what is tail recursion?
टेल रिकर्सन क्या है?

147 / 148

what is the base case in the Merge sort algorithm when it is solved recursively?
जब मर्ज सॉर्ट एल्गोरिथ्म को पुनरावर्ती रूप से हल किया जाता है तो इसका आधार मामला क्या होता है?

148 / 148

What will be the output of the following Python code?

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

min = (lambda x, y: x if x < y else y)

min(101*99, 102*98)

Your score is

The average score is 0%

0%