Q1.
…………… को केवल उस फ़ंक्शन के अंदर ही एक्सेस किया जा सकता है जिसमें उन्हें घोषित किया गया है, जबकि वैश्विक चर को सभी फ़ंक्शन द्वारा पूरे प्रोग्राम बॉडी में एक्सेस किया जा सकता है।
The …………… can be accessed only inside the function in which they are declared, whereas global variables can be accessed throughout the program body by all functions.
A.
ग्लोबल वेरिएबल/Global variables
B.
लोकल वेरिएबल/Local variables
C.
पता नहीं/Can’t say
D.
इनमें से कोई नहीं/None of these
View Answer
Correct Answer: लोकल वेरिएबल/Local variables
Q2.
__________ फ़ंक्शंस का एक सेट है जिसे आप अपने एप्लिकेशन में शामिल करना चाहते हैं।
__________ is a set of functions you want to include in your application.
A.
मॉड्यूल/Module
B.
इम्पोर्ट/Import
C.
ऑब्जेक्ट/Objects
D.
इनमें से कोई नहीं/None of these
View Answer
Correct Answer: मॉड्यूल/Module
Q3.
पैकेज से सभी मॉड्यूल इम्पोर्ट करने के लिए कौन सा कथन सही है
Which statement is correct to import all modules from the package
A.
from package import all
B.
from package import *
C.
from package include all
D.
from package include *
View Answer
Correct Answer: from package import *
Q4.
इनमें से कौन सी परिभाषा मॉड्यूल का सही वर्णन करती है?
Which of these definitions correctly describes a module?
A.
ट्रिपल कोट्स द्वारा दर्शाया गया है/Denoted by triple quotes for providing the specification of certain program elements
B.
प्रोग्राम में शामिल कार्यों का डिज़ाइन/Design and implementation of specific functionality to be incorporated into a program
C.
उपयोग की विशिष्टता/Defines the specification of how it is to be used
D.
कोई भी प्रोग्राम जो कोड पुन: उपयोग करता है/Any program that reuses code
View Answer
Correct Answer: प्रोग्राम में शामिल कार्यों का डिज़ाइन/Design and implementation of specific functionality to be incorporated into a program
Q5.
निम्नलिखित में से कौन “from …. import ……” बारे में गलत है
Which of the following is false about “from …. import ……” form of import?
A.
सिंटैक्स है: from modulename import identifier
B.
यह कुछ भी इम्पोर्ट नहीं करता है/This form of import does not import anything
C.
इम्पोर्ट मॉड्यूल नेमस्पेस का हिस्सा बन जाता है
D.
पहचानकर्ताओं को सीधे एक्सेस किया जाता है
View Answer
Correct Answer: यह कुछ भी इम्पोर्ट नहीं करता है/This form of import does not import anything
Q6.
किसी मॉड्यूल को दूसरे मॉड्यूल में उपयोग करने के लिए, आपको इसे ………… का उपयोग करके आयात करना होगा।
To use a module in another module, you must import it using an …………. statement.
A.
import
B.
include
C.
दोनों a और b/both a and b
D.
इनमें से कोई नहीं/None of these
View Answer
Correct Answer: import
Q7.
निम्नलिखित में से कौन सा मॉड्यूल का उपयोग करने का लाभ नहीं है
Which of the following is not an advantage of using modules
A.
कोड के पुन: उपयोग का साधन/Provides a means of reuse of program code
B.
कार्य विभाजन का साधन/Provides a means of dividing up tasks
C.
प्रोग्राम का आकार कम करना/Provides a means of reducing the size of the program
D.
प्रत्येक भाग को टेस्ट करने का कोई साधन नहीं/Provides a means of testing individual parts of the program
View Answer
Correct Answer: प्रत्येक भाग को टेस्ट करने का कोई साधन नहीं/Provides a means of testing individual parts of the program
Q8.
किसी फ़ंक्शन के बाहर परिभाषित वेरिएबल को क्या कहा जाता है?
What is a variable defined outside a function referred to as?
A.
स्थैतिक वेरिएबल/Static variable
B.
ग्लोबल वेरिएबल/Global variable
C.
लोकल वेरिएबल/Local variable
D.
ऑटोमैटिक वेरिएबल/Automatic variable
View Answer
Correct Answer: ग्लोबल वेरिएबल/Global variable
Q9.
निम्नलिखित में से कौन सी DocString की एक विशेषता है?
Which of the following is a feature of DocString?
A.
डॉक्यूमेंटेशन का आसान तरीका/Provide a convenient way of associating documentation
B.
हर फ़ंक्शन में होनी चाहिए/All functions should have a docstring
C.
doc को __doc__ से एक्सेस किया जा सकता है
D.
उपरोक्त सभी/All of the mentioned
View Answer
Correct Answer: उपरोक्त सभी/All of the mentioned
Q10.
इनमें से कौन सी पायथन में पैकेज की परिभाषा है?
Which of these is the definition for packages in Python?
A.
पायथन मॉड्यूल का एक फ़ोल्डर/A folder of Python modules
B.
मॉड्यूल का प्रयोग करने वाला प्रोग्राम सेट
C.
मुख्य मॉड्यूल का सेट
D.
परिभाषाएं और कथन वाली फाइलें
View Answer
Correct Answer: पायथन मॉड्यूल का एक फ़ोल्डर/A folder of Python modules
Q11.
पैकेज के बारे में इनमें से कौन सा गलत है?
Which of these is false about a package?
A.
एक पैकेज में सबफ़ोल्डर और मॉड्यूल हो सकते हैं
B.
प्रत्येक इम्पोर्ट को नेमस्पेस की आवश्यकता नहीं होती
C.
import folder.subfolder.mod1 imports packages
D.
from folder.subfolder.mod1 import objects imports packages
View Answer
Correct Answer: प्रत्येक इम्पोर्ट को नेमस्पेस की आवश्यकता नहीं होती
Q12.
निम्नलिखित में से कौन सा वैध नेमस्पेस नहीं है?
Which of the following is not a valid namespace?
A.
ग्लोबल नेमस्पेस/Global namespace
B.
पब्लिक नेमस्पेस/Public namespace
C.
बिल्ट-इन नेमस्पेस/Built-in namespace
D.
लोकल नेमस्पेस/Local namespace
View Answer
Correct Answer: पब्लिक नेमस्पेस/Public namespace
Q13.
LEGB का मतलब है …………….
LEGB stands for …………….
A.
Local Endicator Global Built
B.
Long Enclose Global Built
C.
Local Enclosed Global Built-in
D.
Long Exclusion Garbage Built-in
View Answer
Correct Answer: Local Enclosed Global Built-in
Q14.
किसी दिए गए मॉड्यूल का उपयोग करने वाले प्रोग्राम को मॉड्यूल का ______ कहा जाता है।
Program code making use of a given module is called a ______ of the module.
A.
क्लाइंट/Client
B.
डॉकस्ट्रिंग/Docstring
C.
इंटरफेस/Interface
D.
मॉड्यूलरिटी/Modularity
View Answer
Correct Answer: क्लाइंट/Client
Q15.
______ कुछ प्रोग्राम एलिमेंट्स की विशिष्टताओं को प्रदान करने के लिए ट्रिपल कोट्स द्वारा दर्शाया गया एक स्ट्रिंग लिटरल है।
______ is a string literal denoted by triple quotes for providing the specifications of certain program elements.
A.
इंटरफेस/Interface
B.
मॉड्यूलरिटी/Modularity
C.
क्लाइंट/Client
D.
डॉकस्ट्रिंग/Docstring
View Answer
Correct Answer: डॉकस्ट्रिंग/Docstring
Q16.
टॉप-डाउन डिज़ाइन में प्रत्येक मॉड्यूल को समान संख्या में सबमॉड्यूल में विभाजित किया गया है।
In top-down design every module is broken into same number of submodules.
A.
सही/True
B.
गलत/False
C.
पता नहीं/Can’t say
D.
इनमें से कोई नहीं/None of these
View Answer
Correct Answer: गलत/False
Q17.
पैकेज एक फ़ोल्डर है जिसमें एक या अधिक पायथन मॉड्यूल होते हैं। पैकेज में मॉड्यूल में से एक को ……… कहा जाना चाहिए
A package is a folder containing one or more Python modules. One of the modules in a package must be called ………
A.
Package.py
B.
__main__.py
C.
main.py
D.
__init__.py
View Answer
Correct Answer: __init__.py
Q18.
निम्नलिखित में से कौन सा गलत सिंटेक्स है?
Which of the following is an incorrect syntax?
A.
import function from module
B.
from module import function
C.
import module
D.
None of the above
View Answer
Correct Answer: import function from module
Q19.
पायथन के लिए निम्नलिखित में से कौन सा एनवायरनमेंट वेरिएबल पायथन इंटरप्रेटर को बताता है कि प्रोग्राम में इम्पोर्टेड मॉड्यूल फ़ाइलों का पता कहाँ लगाना है?
Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program?
A.
PYTHONPATH
B.
PYTHONSTARTUP
C.
PYTHONCASEOK
D.
PYTHONHOME
View Answer
Correct Answer: PYTHONPATH
Q20.
एक पायथन मॉड्यूल में ………… एक्सटेंशन होता है।
A python module has …………extension.
A.
.mod
B.
.imp
C.
.py
D.
.mpy
View Answer
Correct Answer: .py