Q1.
पायथन में एक फ़ंक्शन कैसे घोषित किया जाता है?
How is a function declared in Python ?
A.
def function function_name():
B.
declare function function_name():
C.
def function_name():
D.
declare function_name():
View Answer
Correct Answer: def function_name():
Q2.
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?import sys
sys.stdout.write('Welcome\n')
sys.stdout.write('All\n')
A.
WelcomeAll
B.
Welcome All
C.
Compilation Error
D.
Runtime Error
View Answer
Correct Answer: Welcome All
Q3.
फ़ाइल खोलने के लिए निम्न में से कौन सा सही मोड नहीं है?
Which of the following is not a correct mode to open a file?
View Answer
Correct Answer: rw
Q4.
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:
The syntax used to rename a file :
A.
os.rename(existing_name, new_name)
B.
fp.name = 'new_name.txt'
C.
os.rename(fp, new_name)
D.
os.set_name(existing_name, new_name)
View Answer
Correct Answer: os.rename(existing_name, new_name)
Q5.
यदि हम एक फाइल को राइट मोड में खोलते हैं और फाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?
If we open a file in write mode and file does not exists, which of the error will generate ?
A.
File Found Error
B.
File Not Exist Error
C.
File Not Found Error
D.
None of these
View Answer
Correct Answer: None of these
Q6.
निम्नलिखित कोड द्वारा कितनी संख्याएँ मुद्रित की जाएंगी?
How many numbers will be printed by the following code ?def fun(a,b):
for x in range(a,b+1):
if x%3==0:
print(x, end=" ")
fun(100,120)
View Answer
Correct Answer: 7
Q7.
निम्नलिखित कोड क्या प्रिंट करता है?
What does the following code print?x = 'mohan'
for i in range(len(x)):
x[i].upper()
print(x)
A.
mohan
B.
MOHAN
C.
Error
D.
None of these
View Answer
Correct Answer: mohan
Q8.
फ़ाइल ऑब्जेक्ट infile से फ़ाइल की शेष पंक्तियों को पढ़ने का कार्य कौन सा है?
Which is the function to read the remaining lines of the file from a file object infile ?
A.
infile.read
B.
infile.read()
C.
infile.readlines()
D.
infile.readline()
View Answer
Correct Answer: infile.read()
Q9.
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following?import numpy as np
a = np.array([1,5,4,7,8])
a = a + 1
print(a[1])
View Answer
Correct Answer: 6
Q10.
निम्नलिखित कोड का परिणाम क्या है?
What is the output of the following code?dict={"Joey":1,"Rachel":2}
dict.update({"Phoebe":2})
print(dict)
A.
"Joey":1,"Rachel":2,"Phoebe":2
B.
{"Joey":1,"Rachel":2}
C.
{"Joey":1,"Phoebe":2}
D.
Error
View Answer
Correct Answer: "Joey":1,"Rachel":2,"Phoebe":2
Q11.
परीक्षण के रूप में जाना जाता है:
Testing is known as :
A.
A stage of all projects
B.
Finding broken code
C.
Evaluating deliverable to find errors
D.
None of the above
View Answer
Correct Answer: Evaluating deliverable to find errors
Q12.
एक प्रोसेस को फ्लोचार्ट में __________ द्वारा व्यक्त किया जाता है।
A process is expressed in a flowchart by __________.
A.
Rectangle
B.
A circle
C.
Parallelogram
D.
A diamond
View Answer
Correct Answer: Rectangle
Q13.
नीचे दिए गए प्रोग्राम का आउटपुट क्या है?
What is the output of below program ?def maximum(x, y):
if x > y:
return x
elif x == y:
return 'The numbers are equal'
else:
return y
print(maximum(2, 3))
A.
2
B.
3
C.
The numbers are equal
D.
None of the options
View Answer
Correct Answer: 3
Q14.
निम्नलिखित बयानों के बाद आउटपुट क्या होगा?
What will be the output after the following statements?for i in range(1,6):
print(i, end='')
if i == 3:
break
A.
1 2
B.
1 2 3
C.
1 2 3 4
D.
1 2 3 4 5
View Answer
Correct Answer: 1 2 3
Q15.
सभी अक्षरों को पढ़ने के लिए किस फंक्शन का प्रयोग किया जाता है?
Which function is used to read all the characters?
A.
readall()
B.
read()
C.
readcharacters()
D.
readchar()
View Answer
Correct Answer: read()
Q16.
>>> float('12.6') का आउटपुट क्या है
What is the output of >>> float('12.6')
A.
12.6
B.
'12.6'
C.
12
D.
syntax error
View Answer
Correct Answer: 12.6
Q17.
निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following?import numpy as np
print(np.maximum([2, 3, 4], [1, 5, 2]))
A.
[1 5 2]
B.
[1 5 4]
C.
[2 3 4]
D.
[2 5 4]
View Answer
Correct Answer: [2 5 4]
Q18.
“from …. import ……” इम्पोर्ट फॉर्म के बारे में कौन सा असत्य है?
Which of the following is false about “from …. import ……” form of import?
A.
The syntax is: from modulename import identifier
B.
This form of import does not import anything
C.
The namespace of imported module becomes part of importing module
D.
The identifiers in module are accessed directly as: identifier
View Answer
Correct Answer: This form of import does not import anything
Q19.
बाइनरी फॉर्मेट में डेटा लिखने के लिए उपयोग किया जाने वाला एक फंक्शन:
A function used for writing data in the binary format :
A.
write
B.
output
C.
send
D.
dump
View Answer
Correct Answer: dump
Q20.
फ्लोचार्ट के स्टार्ट और स्टॉप को दर्शाने के लिए किस प्रतीक का प्रयोग किया जाता है?
What is the symbol used to represent start and stop of a flowchart ?
A.
oval
B.
rectangle
C.
arrow
D.
diamond
View Answer
Correct Answer: oval