page-banner
Chapter-6 (Part-2) Python Function
Q1.
सिस्टम मेमोरी के किस भाग में फ़ंक्शन कॉल के पैरामीटर और लोकल वेरिएबल्स को संग्रहीत करता है?

Which part of the memory does the system store the parameter and local variables of a function call?
A. heap
B. stack
C. Uninitialized data segment
D. None of these
View Answer
Q2.
आउटपुट क्या होगा

What is the output?
def calc(x):
    r = 2 * x ** 2
    return r
print(calc(5))
A. Error
B. 50
C. 100
D. 20
View Answer
Q3.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

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)
A. 3
B. 4
C. 4 is maximum
D. None of these
View Answer
Q4.
निम्नलिखित कोड का आउटपुट क्या होगा?

What is the output of the following code?
x = 50
def func(x):
    x = 2
    func(x)
print('x is now', x)
A. x is now 50
B. x is now 2
C. x is now 100
D. Error
View Answer
Q5.
निम्नलिखित कोड का आउटपुट क्या होगा?

What is the output of the following code?
def disp(*arg):
    for i in arg:
        print(i)
disp(name="Rajat", age="20")
A. TypeError
B. Rajat 20
C. Name age
D. None of these
View Answer

Create Account