Python - Function In Python
Questions No: 1/50

Which argument type allows specifying parameter names during function call?
किस प्रकार के तर्क से फंक्शन कॉल के दौरान पैरामीटर नाम निर्दिष्ट किए जा सकते हैं?

Questions No: 2/50

Which of the following function headers is correct ?
निम्नलिखित में से कौन सा फंक्शन हेडर सही है?

Questions No: 3/50

What will be the output?

def fun(a,b=2,c=3):
    print(a,b,c)
fun(1,c=10)

Questions No: 4/50

What will be the output of the following Python code?

def foo():
    return total + 1
total = 0
print(foo())

Questions No: 5/50

find the output of following code:

def add(a,b):
    return(a+b)
print(add(3,4))

Questions No: 6/50

What is the output of the following code ?

def disp(*arg):
    for i in arg:
        print(i)
disp(name="Rajat", age="20")

Questions No: 7/50

def keyword use for?
def कीवर्ड का उपयोग किसके लिए किया जाता है?

Questions No: 8/50

What is the correct syntax of a lambda function?
लैम्डा फंक्शन का सही सिंटैक्स क्या है?

Questions No: 9/50

Which of the following functions is a built-in function in pythonn
निम्न में से कौन सा फंक्शन पायथन में बिल्ट-इन फंक्शन है

Questions No: 10/50

Which of the following is NOT a valid type of argument in Python?
निम्नलिखित में से कौन सा पाइथन में मान्य तर्क प्रकार नहीं है?

Questions No: 11/50

A statement is used when a statement is required syntactically but you do not want any code to execute.
एक स्टेटमेंट का उपयोग तब किया जाता है जब किसी स्टेटमेंट को वाक्यात्मक रूप से आवश्यक होता है लेकिन आप नहीं चाहते कि कोई कोड निष्पादित हो।

Questions No: 12/50

____ are the arguments passed to a function in correct positional order.
सही स्थिति क्रम में किसी फंक्शन को दिए गए आर्गुमेन्ट हैं।

Questions No: 13/50

Which part of the memory does the system store the parameter and local variables of a function call ?
मेमोरी का कौन सा भाग सिस्टम फ़ंक्शन कॉल के पैरामीटर और स्थानीय चर को संग्रहीत करता है?

Questions No: 14/50

What will be the output?

def fun(a, b=5):
    print(a+b)
fun(10, 20)

Questions No: 15/50

Which variable has local scope?
कौन-सा variable local scope में होता है?

Questions No: 16/50

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

Questions No: 17/50

What will be the output?

def fun(a,b=5,c=10):
    print(a+b+c)
fun(2,c=20)

Questions No: 18/50

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

Questions No: 19/50

What is the output of following?
निम्न code का output क्या होगा?

Questions No: 20/50

Which of the following is TRUE about lambda functions?
लैम्डा फंक्शन के बारे में निम्नलिखित में से कौन सा कथन सत्य है?

Questions No: 21/50

What will be the output of the following Python code?

x='abcd'
for i in x:
    print(i.upper())


Questions No: 22/50

How many arguments a Python program can accept from the command line?
पायथन प्रोग्राम कमांड लाइन से कितने तर्क स्वीकार कर सकता है?

Questions No: 23/50

What does a function return if there is no return statement?
यदि किसी फंक्शन में रिटर्न स्टेटमेंट नहीं है, तो वह फंक्शन क्या रिटर्न करेगा?

Questions No: 24/50

Which one of the following is the correct way of calling a function?
निम्नलिखित में से कौन-सा एक फंक्शन को कॉल करने का सही तरीका है?

Questions No: 25/50

The variables in a function definition are called as
फ़ंक्शन परिभाषा में वेरिएबल्स को कहा जाता है

Questions No: 26/50

What is the output of the following code ?

def fun(a, b=6):
    a=a+b
    print(a)
fun(5, 4)

Questions No: 27/50

Given a string x="hello" What is the output of x.count('l')?
एक स्ट्रिंग x = "hello " को देखते हुए x.count ('1') का आउटपुट क्या है?

Questions No: 28/50

What will be the output of the following python program?

def addItem(listParam):
    listParam+=[1]
mylist=[1,2,3,4]
addItem(mylist)
print(len(mylist))

Questions No: 29/50

What is the value of the following Python code?

>>>print(36 / 4)

Questions No: 30/50

Which of the following is an anonymous function in Python?
निम्नलिखित में से कौन सा पाइथन में एक अनाम फ़ंक्शन है?

Questions No: 31/50

What is the scope of a function parameter?
फंक्शन पैरामीटर का स्कोप क्या है?

Questions No: 32/50

What will be printed?

x = 10
def f():
    x = 20
    print(x)
f()
print(x)

Questions No: 33/50

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)

Questions No: 34/50

What is the output of following?

def f(a, b):
    print(a, b)
f(b=2, a=1)

Questions No: 35/50

If return statement is not used inside the function, the function will return:
यदि फंक्शन के अंदर रिटर्न स्टेटमेंट का उपयोग नहीं किया जाता है, तो फंक्शन रिटर्न करेगा:

Questions No: 36/50

Which symbol is used for variable-length positional arguments?
चर-लंबाई वाले पोजीशनल आर्गुमेंट्स के लिए किस प्रतीक का उपयोग किया जाता है?

Questions No: 37/50

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])

Questions No: 38/50

What is the output of the following code?

x = 50
def func (x):
    x = 2
func (x)
print ('x is now', x)

Questions No: 39/50

What will be the output of the following Python code?

def foo():
    total += 1
    return total
total = 0
print(foo())

Questions No: 40/50

Given a function that does not return any value, what value is shown when executed at the shell ?
एक फ़ंक्शन जो कोई मान नहीं लौटाता है ,शेल पर निष्पादित होने पर कौन सा मान दिखाया जाता है

Questions No: 41/50

What will be the output of the following Python code?

example = "helle"
print(example.rfind("e"))

Questions No: 42/50

What will be the output of the following Python code?

def foo(k):      
k[0] = 1  
q = [0]  
foo(q)  
print(q)

Questions No: 43/50

____ keyword used for function in python
पायथन में फ़ंक्शन के लिए कौन सा कीवर्ड उपयोग किया जाता है

Questions No: 44/50

Which keyword is used for function in Python language?
पायथन भाषा में फंक्शन के लिए कौन सा कीवर्ड प्रयोग किया जाता है?

Questions No: 45/50

How do you define a function in Python?
पायथन में एक फ़ंक्शन कैसे घोषित किया जाता है?

Questions No: 46/50

What will be the output of following?

Y=[2,5J,6]
Y.sort()

Questions No: 47/50

Debugging is the process of fixing a______in the software.
डिबगिंग सॉफ्टवेयर में ______ को ठीक करने की प्रक्रिया है।

Questions No: 48/50

What is the output of below program ?

def say(message, times =1):
    print(message * times)
say("Hello")
say("Word",5)

Questions No: 49/50

What will be printed?

x = 5
def f():
    global x
    x = 10
f()
print(x)

Questions No: 50/50

Which one of the following is incorrect?
निम्नलिखित में से कौन सा गलत है?