O Level - Functions In Python
Questions No: 1/50

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

Questions No: 2/50

What is a recursive function?
एक रिकर्सिव फंक्शन क्या है?

Questions No: 3/50

Structured program can be broken into to assign to more than one developer
एक से अधिक डेवलपर को असाइन करने के लिए संरचित प्रोग्राम को खंडित किया जा सकता है

Questions No: 4/50

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

Questions No: 5/50

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

Questions No: 6/50

What will be the output of the following Python expression?

print(round(4.5676,2))

Questions No: 7/50

Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.

fun1(25, 75, 55)
fun1(10, 20)

Questions No: 8/50

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

Questions No: 9/50

What will be the output of the following Python code?

from math import factorial
print(math.factorial(5))

Questions No: 10/50

What is the output of following?

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

Questions No: 11/50

What is the main advantage of using functions?
फंक्शन का उपयोग करने का मुख्य लाभ क्या है?

Questions No: 12/50

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

Questions No: 13/50

You can also create your own functions, these functions are called?
आप अपने खुद के फंक्शन भी बना सकते हैं, इन फंक्शन्स को क्या कहते हैं?

Questions No: 14/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: 15/50

What will be the output of the following Python function?

import math
print(abs(math.sqrt(25)))

Questions No: 16/50

find the output of following code:

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

Questions No: 17/50

Which of the following is a distinct syntactic block?
निम्नलिखित में से कौन सा एक विशिष्ट वाक्यात्मक ब्लॉक है?

Questions No: 18/50

What does eval() do?
eval() क्या करता है?

Questions No: 19/50

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

Questions No: 20/50

Which of these is false about recursion?
इनमें से कौन सी पुनरावृत्ति के बारे में गलत है?

Questions No: 21/50

What is the output of following?

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

Questions No: 22/50

What will be printed?

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

Questions No: 23/50

A variable declared outside all functions is known as:
किसी भी फ़ंक्शन के बाहर घोषित किए गए वेरिएबल को इस नाम से जाना जाता है:

Questions No: 24/50

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

Questions No: 25/50

Function defined to achieve some task as per the programmers requirement is called a :
प्रोग्रामर की आवश्यकता के अनुसार किसी कार्य को प्राप्त करने के लिए परिभाषित फंक्शन कहलाता है

Questions No: 26/50

What is the type of input received using input()?
input() का return type क्या होता है?

Questions No: 27/50

What will be the output of the following?

def iq(a,b):
    if(a==0):
       return b
    else:
       return iq(a-1,a+b)
print(iq(3,6))

Questions No: 28/50

What is the output of the following code ?

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

Questions No: 29/50

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

Questions No: 30/50

What will be the output of the following Python code?

def foo(x):
    x = ['def', 'abc']
    return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))

Questions No: 31/50

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

Questions No: 32/50

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

Questions No: 33/50

Default argument values are evaluated:
Default argument values कब evaluate होती हैं?

Questions No: 34/50

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

Questions No: 35/50

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

Questions No: 36/50

What is the output of the following?

x=123
for i in x:
    print(i)

Questions No: 37/50

what is Lambda function in python
पायथन में लैम्ब्डा फंक्शन क्या है ?

Questions No: 38/50

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

Questions No: 39/50

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

Questions No: 40/50

What will be the output of the following Python code?

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


Questions No: 41/50

What is the output of this code?

def calc(x):
       r=2*x**2
       return r
print(calc(5))

Questions No: 42/50

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

Questions No: 43/50

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

Questions No: 44/50

How many numbers will be printed by the following code?

def fun(a,b):
    for x in range(a,b+1):
        if x%3==0:
            print(x,end=" ")
fun(100,120)

Questions No: 45/50

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

Questions No: 46/50

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

Questions No: 47/50

What is the output of the following code?

def s(n1):
    print(n1)
    n1=n1+2
n2=4
s(n2)
print(n2)

Questions No: 48/50

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

Questions No: 49/50

The values which are passed to a function definition are called
वे मान जो किसी फ़ंक्शन परिभाषा में पारित किए जाते हैं, कहलाते हैं

Questions No: 50/50

Recursive function is
रिकर्सिव फंक्शन _______है