🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

Scope and Modules

Question: 1 Report Error

sys.argv में प्रत्येक element का प्रकार क्या है?

What is the type of each element in sys.argv?

A)
B)
C)
D)

Question: 2 Report Error

किसी फंक्शन के बाहर परिभाषित वेरिएबल को क्या कहते हैं?

What is a variable defined outside a function called?

A)
B)
C)
D)

Question: 3
Verified by Expert

LEGB Rule में E से तात्पर्य Entry है

In LEGB Rule, E stands for Entry.

A)
B)
C)
D)
Explanation
In the LEGB rule for Python scope resolution, E stands for Enclosing (or Enclosed/Nonlocal), not Entry. The rule defines the order in which Python searches for variable names.

Correct Answer: B) False


Question: 4 Report Error

python में PIP का क्या काम है ?

What is the function of PIP in python?

A)
B)
C)
D)

Question: 5
Verified by Expert

Package एक __________ है, जिसमे multiple _________ होते है ?

Package is a __________, which contains multiple _________?

A)
B)
C)
D)
Explanation
A package is a namespace, which contains multiple modules.

Correct Answer: D) namespace, module


Question: 6 Report Error

local variables का नाम अंडरस्कोर से क्यों शुरू होता है?

Why do names of local variables start with an underscore?

A)
B)
C)
D)

Question: 7 Report Error

पायथन में LEGB का पूर्ण रूप क्या है?

What is the full form of LEGB in Python?

A)
B)
C)
D)

Question: 8 Report Error

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

What will be the output of the following ?

import sys 
sys.stdout.write('Hello\n') 
sys.stdout.write('Python\n')
A)
B)
C)
D)

Question: 9
Verified by Expert

पायथन स्क्रिप्ट को निष्पादन योग्य प्रोग्राम में बदलने के लिए किस मॉड्यूल का उपयोग किया जा सकता है?

Which module can be used to convert a Python script into an executable program?

A)
B)
C)
D)
Explanation
py2exe is a widely used Python extension that converts scripts (.py) into standalone Microsoft Windows executables (.exe), allowing them to run on systems without a Python installation.

Correct Answer: B) py2exe


Question: 10 Report Error

पायथन में वेरिएबल का दायरा क्या है?

What is the scope of a variable in Python?

A)
B)
C)
D)

Question: 11 Report Error

पायथन में "नेमस्पेस" शब्द का क्या अर्थ है?

What does the term "namespace" refer to in Python?

A)
B)
C)
D)

Question: 12 Report Error

पायथन मानक लाइब्रेरी में कौन सा मॉड्यूल कमांड लाइन से प्राप्त विकल्पों को पार्स करता है?

Which module in the python standard library parses options received from the command line ?

A)
B)
C)
D)

Question: 13 Report Error

पायथन में, मॉड्यूल क्या है?

In Python, what is a module?

A)
B)
C)
D)

Question: 14 Report Error

randint() फ़ंक्शन का उपयोग करने के लिए कौन सा मॉड्यूल आयात किया जाना है?

Which module is to be imported for using randint( ) function ?

A)
B)
C)
D)

Question: 15
Verified by Expert

किसी मॉड्यूल को दूसरे मॉड्यूल में उपयोग करने के लिए, आपको इसे ________ स्टेटमेंट का उपयोग करके आयात करना होगा।

To use a module in another module, you must import it using an ________ statement.

A)
B)
C)
D)
Explanation
The import keyword is the standard mechanism in languages like Python and Java to bring external functionality, classes, or modules into a program's scope. While the term "include" is used in languages like C or C++ (as #include), it functions differently by performing a literal text substitution of a header file rather than a symbolic module import.

Correct Answer: A) import


Question: 16
Verified by Expert

निम्नलिखित में से कौन सा मॉड्यूल का उपयोग करने का लाभ नहीं है?

Which of the following is not an advantage of using modules ?

A)
B)
C)
D)

Question: 17
Verified by Expert

पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है?

Which statement is correct to import all modules from the package ?

A)
B)
C)
D)

Question: 18 Report Error

यादृच्छिक लाइब्रेरी में मौजूद फ़ंक्शंस के उपयोग को शामिल करने के लिए, हमें विकल्प का उपयोग करना चाहिए:

To include the use of functions which are present in the random library, we must use the option:

A)
B)
C)
D)

Question: 19 Report Error

"से..." के बारे में निम्नलिखित में से कौन सा गलत है? आयात ……” आयात का रूप?

Which of the following is false about “from …. import ……” form of import?

A)
B)
C)
D)

Question: 20 Report Error

बाइनरी फ़ाइल डेटा को पढ़ने के लिए ___________ फ़ंक्शन का उपयोग किया जाता है।

To read binary files data ___________ function is used.

A)
B)
C)
D)

Question: 21 Report Error

पायथन मॉड्यूल में __init__.py फ़ाइल का कार्य क्या है?

What is the function of the __init__.py file in a Python module?

A)
B)
C)
D)

Question: 22 Report Error

पायथन लिपि में if __name__ == "__main__": कथन का उद्देश्य क्या है?

What is the purpose of the if __name__ == "__main__": statement in a Python script?

A)
B)
C)
D)

Question: 23
Verified by Expert

पायथन में

What does the term "namespace" refer to in Python?

A)
B)
C)
D)
Explanation
In Python, a namespace is essentially a mapping between names (identifiers) and objects. It defines the scope in which a variable exists and can be accessed, such as local, global, and built-in namespaces.

Correct Answer: A) The scope of a variable


Question: 24 Report Error

पायथन में किस मॉड्यूल का उपयोग नेटवर्क सॉकेट के साथ काम करने के लिए किया जा सकता है?

which module in python can be used for working with network socket?

A)
B)
C)
D)

Question: 25 Report Error

Sys.argv कितने प्रकार का होता है?

What is the type of sys.argv

A)
B)
C)
D)

Question: 26 Report Error

कैलेंडर के साथ काम करने के लिए पायथन के अंतर्निहित मॉड्यूल का नाम क्या है

What is the name of Python’s built-in module for working with calendars

A)
B)
C)
D)

Question: 27 Report Error

कोड स्निपेट के निष्पादन समय को मापने के लिए पायथन के अंतर्निहित मॉड्यूल का नाम क्या है

What is the name of Python’s built-in module for measuring execution time of code snippets

A)
B)
C)
D)

Question: 28
Verified by Expert

Python में मॉड्यूल इंपोर्ट करने के लिए कौन-सा कीवर्ड उपयोग होता है

Which operator/keyword is used to import modules in Python

A)
B)
C)
D)

Question: 29
Verified by Expert

पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है

Which statement is correct to import all modules from the package

A)
B)
C)
D)

Question: 30
Verified by Expert

निम्नलिखित स्टेटमेंट्स का आउटपुट क्या होगा

What will be the output after the following statements

import os
x = os.getcwd()
print(x)
A)
B)
C)
D)

Latest Updates