Test - Test 2

Total Questions: 20
Time Left: 19:53
Icon
1.

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

x = [1, 2, 3]
y = x
y[0] = 10
print(x)

2.

Which of the following methods can be used to remove elements from a list while iterating over it in Python?

पायथन में किसी सूची पर पुनरावृत्ति करते समय उसमें से तत्वों को हटाने के लिए निम्नलिखित में से किस विधि का उपयोग किया जा सकता है?


3.

What does the super() function do in Python?

पायथन में super() फ़ंक्शन क्या करता है?


4.

Which of the following statements is true about Python's lambda function?

पायथन के लैम्ब्डा फ़ंक्शन के बारे में निम्नलिखित में से कौन सा कथन सत्य है?


5.

What will be the output of the following code?

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

try:
    x = 1 / 0
except ZeroDivisionError:
    print("Zero Division Error")
else:
    print("No Error")
finally:
    print("Finally Block")

6.

What will the following code output?

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

def myFunc(x, y=[]):
    y.append(x)
    return y
print(myFunc(1))
print(myFunc(2, []))
print(myFunc(3))

7.

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?



x = [1, 2, 3]
y = x
x.append(4)
y = [4, 5]
print(x)
print(y)

8.

What is the output of the following code?

निम्नलिखित कोड का परिणाम क्या है?

x = {'a': 1, 'b': 2}
x.update({'c': 3})
print(x)

9.

What is the output of this code?

इस कोड का आउटपुट क्या है?

x = 10
def f():
    x = 20
    def g():
        nonlocal x
        x = 30
    g()
    return x

print(f())


10.

Which of the following is a valid variable name in Python?

निम्नलिखित में से कौन सा पायथन में वैध चर नाम है?


11.

Which of the following data types are immutable in Python?

पायथन में निम्नलिखित में से कौन से डेटा प्रकार अपरिवर्तनीय हैं?


12.

To read the entire remaining contents of a file as a string from a file object `infile`, we use:

फ़ाइल ऑब्जेक्ट `infile` से स्ट्रिंग के रूप में फ़ाइल की संपूर्ण शेष सामग्री को पढ़ने के लिए, हम उपयोग करते हैं:


13.

The way to solve a problem step by step is known as:

किसी समस्या को चरणबद्ध तरीके से हल करने का तरीका इस प्रकार है:


14.

FORTRAN stands for:

फोरट्रान का पूरा नाम है:


15.

The `full()` function requires a minimum of 2 arguments to be passed.

`full()` फ़ंक्शन को न्यूनतम 2 तर्कों को पारित करने की आवश्यकता होती है।


16.

The `reshape` function returns its argument with a modified shape, whereas the `resize` method modifies the array itself.

`reshape` फ़ंक्शन अपने तर्क को संशोधित आकार के साथ लौटाता है, जबकि `resize` विधि स्वयं सरणी को संशोधित करती है।


17.

What does the len() function do in Python?

पायथन में len() फ़ंक्शन क्या करता है?


18.

What is the correct syntax to output the type of a variable or object in Python?

पायथन में किसी चर या ऑब्जेक्ट के प्रकार को आउटपुट करने के लिए सही सिंटैक्स क्या है?


19.

Which of the following is a mutable data type in Python?

निम्नलिखित में से कौन सा पायथन में एक परिवर्तनीय डेटा प्रकार है?


20.

What will be the output of print("Hello"[1]) ?

print("Hello"[1]) का आउटपुट क्या होगा?