Q1.
कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट "f" है)?
Which statement will return one line from a file (file object is 'f')?
A.
f.readlines()
B.
f.readline()
C.
f.read()
D.
f.line()
View Answer
Correct Answer: f.readline()
Q2.
निम्नलिखित लाइन को फंक्शनल बनाने के लिए किस मॉड्यूल को इम्पोर्ट किया जायेगा?
Which module to be imported to make the following line functional?
sys.stdout.write("ABC")
A.
system
B.
stdin
C.
stdout
D.
sys
View Answer
Correct Answer: sys
Q3.
निम्नलिखित कोड का आउटपुट क्या होगा?
What will be the output of the following code?
import math
abs(math.sqrt(36))
A.
Error
B.
6
C.
-6
D.
6.0
View Answer
Correct Answer: Error
Q4.
निम्नलिखित कोड का आउटपुट क्या है?
What is the output of the following code?
a=set('abc')
b=set('cd')
print(a^b)
A.
{a,b,c,d}
B.
{'c', 'b', 'a', 'd'}
C.
{'b', 'a', 'd'}
D.
None of these
View Answer
Correct Answer: {'b', 'a', 'd'}
Q5.
__________ एक कंटेनर है जो निरूपित आकृतियों के बीच सम्बन्ध को दर्शाता है
__________ is a connector showing the relationship between the representative shapes.
A.
Line
B.
Arrow
C.
Process
D.
Box
View Answer
Correct Answer: Arrow
Q6.
वह विधि जो किसी दिए गए प्रारंभिक अवस्था से लेकर अंतिम अवस्था तक किसी कार्य को पूरा करने के लिए अच्छी तरह से परिभाषित निर्देशों की सूची का उपयोग करती है, उसे __________ कहा जाता है।
Method which uses a list of well-defined instructions to complete a task starting from a given initial state to end state is called __________.
A.
Program
B.
Algorithm
C.
Flowchart
D.
Both (A) and (C)
View Answer
Correct Answer: Algorithm
Q7.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?
from math import factorial
print(math.sqrt(25))
A.
5.0
B.
Nothing is printed
C.
Error, method sqrt doesn’t exist in math module
D.
Error, the statement should be: print(sqrt(25))
View Answer
Correct Answer: Error, method sqrt doesn’t exist in math module
Q8.
निम्नलिखित में से किस ऑपरेटर की सर्वोच्च प्राथमिकता है?
Which of the following operators has the highest precedence?
View Answer
Correct Answer: *
Q9.
कथन 1 के लिए उत्तर चुनें।
Choose the answer for statement 1.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4
A.
csv
B.
load
C.
pickle
D.
unpickle
View Answer
Correct Answer: pickle
Q10.
os.getlogin() क्या लौटाता है?
What does os.getlogin() return?
A.
name of the current user logged in
B.
gets a form to login as a different user
C.
name of the superuser
D.
all of the above
View Answer
Correct Answer: name of the current user logged in
Q11.
इनमें से कौन सी परिभाषा मॉड्यूल का सही वर्णन करती है?
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
Q12.
पैकेज से सभी मॉड्यूल आयात करने के लिए कौन सा कथन सही है?
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 *
Q13.
__________ लूप को तुरंत पूरी तरह से समाप्त कर देता है।
__________ immediately terminates a loop entirely.
A.
break
B.
continue
C.
pass
D.
none of these
View Answer
Correct Answer: break
Q14.
प्रोग्रामिंग लैंग्वेज के रूप में प्रदर्शित एल्गोरिथम __________ है।
An algorithm represented in the form of programming languages is __________.
A.
Flowchart
B.
Pseudo code
C.
Program
D.
None of the above
View Answer
Correct Answer: Pseudo code
Q15.
निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
import numpy as np
a = np.array([1.1,2,3])
print(a.dtype)
A.
int32
B.
float64
C.
float
D.
None
View Answer
Correct Answer: float64
Q16.
पायथन में निम्नलिखित में से कौन से वैध एस्केप सीक्वेंस हैं?
Which of the following are valid escape sequences in Python?
A.
\n
B.
\t
C.
\\
D.
All of the above
View Answer
Correct Answer: All of the above
Q17.
कथन 2 के लिए उत्तर चुनें।
Choose the answer for statement 2.
import ___________ # statement 1
rec = [ ]
while True:
rn = int(input("Enter"))
nm = input("Enter")
temp = [rn, nm]
rec.append(temp)
ch = input("Enter choice (Y/N)")
if ch.upper == "N":
break
f = open("stud.dat", "____________") #statement 2
__________ .dump(rec, f) #statement 3
_______.close( ) # statement 4
A.
w
B.
wb
C.
w+
D.
write
View Answer
Correct Answer: wb
Q18.
मान लें कि 4 बाइनरी में 100 है और 11 1011 है। निम्नलिखित बिटवाइज़ ऑपरेटरों का आउटपुट क्या है?
Let us assume 4 is 100 in binary and 11 is 1011. What is the output of the following bitwise operators ?
a = 4
b = 11
print(a | b)
print(a >> 2)
A.
15 , 1
B.
14 , 1
C.
17 , 2
D.
16 , 2
View Answer
Correct Answer: 15 , 1
Q19.
जब हम list("hello") निष्पादित करते हैं तो आउटपुट क्या होता है?
What is the output when we execute list("hello")?
A.
['h', 'e', 'l', 'l', 'o']
B.
[' hello']
C.
['llo']
D.
['olleh']
View Answer
Correct Answer: ['h', 'e', 'l', 'l', 'o']
Q20.
निम्नलिखित में से कौन-सा अपरिवर्तनीय डेटा प्रकार है?
Which one of the following is immutable data type?
A.
list
B.
set
C.
tuple
D.
dict
View Answer
Correct Answer: tuple
Q21.
निम्नलिखित का आउटपुट क्या है?
What is the output of the following ?
i = 2
while True:
if i%3 == 0:
break
print(i, end=" " )
i += 2
A.
2 4 6 8 10 ...
B.
2 4
C.
2 3
D.
Error
View Answer
Correct Answer: 2 4
Q22.
निम्नलिखित कोड का आउटपुट क्या होगा?
What will be the output of following code ?
x = ['XX', 'YY']
for i in x:
i.lower()
print(x)
A.
['XX', 'YY']
B.
['xx', 'yy']
C.
[XX, YY]
D.
None of the above
View Answer
Correct Answer: ['XX', 'YY']
Q23.
संरचनात्मक प्रोग्रामिंग में टॉप-डाउन दृष्टिकोण का पालन किया जाता है।
Top-down approach is followed in structural programming.
A.
True
B.
False
C.
Can’t say
D.
May be
View Answer
Correct Answer: True
Q24.
निम्नलिखित में से कौन सा एक फंक्शन को कॉल करने का सही तरीका है?
Which one of the following is the correct way of calling a function?
A.
function_name()
B.
call function_name()
C.
ret function_name()
D.
function function_name()
View Answer
Correct Answer: function_name()
Q25.
यदि किसी फंक्शन में रिटर्न स्टेटमेंट नहीं है, तो निम्नलिखित में से कौन सा फंक्शन रिटर्न करता है?
If a function does not have a return statement, which of the following does the function return?
A.
int
B.
null
C.
An exception is thrown without return
D.
None
View Answer
Correct Answer: None