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

What will be the output of the following Python function?

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

Questions No: 2/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: 3/50

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

Questions No: 4/50

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

Questions No: 5/50

What is the value of the following Python code?

>>>print(36 / 4)

Questions No: 6/50

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

Questions No: 7/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]। यदि हम इस लिस्ट को रिवर्स ऑर्डर में प्रिंट करना चाहते हैं, तो निम्न में से किस मैथड का यूज़ किया जाना चाहिए?

Questions No: 8/50

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

Questions No: 9/50

The code block within every function starts with a ____ ?
प्रत्येक फंक्शन के भीतर एक कोड ब्लॉक ... से शुरू होता है?

Questions No: 10/50

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

Questions No: 11/50

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

Questions No: 12/50

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

Questions No: 13/50

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

Questions No: 14/50

What is the output of the following?

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

Questions No: 15/50

What is the output of below program ?

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

Questions No: 16/50

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

Questions No: 17/50

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

Questions No: 18/50

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

Questions No: 19/50

Which of the following functions is a built-in function in python?
निम्नलिखित में से कौन सा फ़ंक्शन पायथन में एक अंतर्निहित फ़ंक्शन है?

Questions No: 20/50

What will be the output of the following Python function?

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

Questions No: 21/50

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

Questions No: 22/50

What will be the output of the following Python expression?

print(round(4.5676,2))

Questions No: 23/50

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

Questions No: 24/50

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

Questions No: 25/50

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

Questions No: 26/50

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

Questions No: 27/50

What will be the output?

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

Questions No: 28/50

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

Questions No: 29/50

What will be the output of the following Python function?

sum(2,4,6)
sum([1,2,3])

Questions No: 30/50

What is the output of the following

y='klmn'
for i in range(len(y)):
    print(y)

Questions No: 31/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: 32/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: 33/50

What is the output of the following code ?

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

Questions No: 34/50

The sequence logic will not be used while
____के समय सीक्वेंस लॉजिक का उपयोग नहीं किया जाएगा|

Questions No: 35/50

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

Questions No: 36/50

What will be the output of the following Python code?

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

Questions No: 37/50

What will be the output of the following Python function?

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

Questions No: 38/50

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

Questions No: 39/50

What will be the output of following?

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

Questions No: 40/50

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

Questions No: 41/50

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

Questions No: 42/50

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

Questions No: 43/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: 44/50

find the output of following code:

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

Questions No: 45/50

What will be the output?

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

Questions No: 46/50

To which of the following the "in" operator can be used to check if an item is in it?
निम्नलिखित में से किसके लिए "in" ऑपरेटर का उपयोग यह जांचने के लिए किया जा सकता है कि कोई आइटम उसमें है या नहीं?

Questions No: 47/50

What will be the output of the following Python code?

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

Questions No: 48/50

What is recursion?
रिकर्सन क्या है?

Questions No: 49/50

Where is function defined?
फंक्शन को कहां डिफाइन किया जाता है?

Questions No: 50/50

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