Q1.
पायथन में खाली सेट बनाने के लिए कौन से विकल्प सही हैं?
Which options are correct to create an empty set in Python?
A.
{}
B.
[]
C.
()
D.
Set ()
View Answer
Correct Answer: Set ()
Q2.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?a={3,4,5}
b={5,6,7}
print(a|b)
A.
Invalid operation
B.
{3, 4, 5, 6, 7}
C.
{5}
D.
{3,4,6,7}
View Answer
Correct Answer: {3, 4, 5, 6, 7}
Q3.
निम्नलिखित कोड का परिणाम क्या है
What is the output of the following codex = 100
y = 50
print(x and y)
A.
True
B.
100
C.
False
D.
50
View Answer
Correct Answer: 50
Q4.
पायथन में टिप्पणियों को जोड़ने के लिए किस विशेष प्रतीक का उपयोग किया जाता है?
Which is the special symbol used in python to add comments?
A.
$
B.
//
C.
/*………..*/
D.
#
View Answer
Correct Answer: #
Q5.
निम्नलिखित पायथन कोड का मूल्य क्या है
What is the value of the following Python codeprint(36 / 4)
View Answer
Correct Answer: 9.0
Q6.
round (0.5) – round(-0.5) का नतीजा क्या है?
What is the result of round (0.5) – round(-0.5)?
View Answer
Correct Answer: 0
Q7.
________ फ़ंक्शन मूल सरणी को संशोधित करता है और _________ फ़ंक्शन सरणी का एक नया उदाहरण बनाता है।
The ________ function modifies the original array and _________ function creates a new instance of the array.
A.
reshape,resize
B.
resize,reshape
C.
ndims,resize
D.
reshape, ndims
View Answer
Correct Answer: resize,reshape
Q8.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?for i in range(2.0):
print(i)
A.
0.0 1.0
B.
0 1
C.
error
D.
none of the mentioned
View Answer
Correct Answer: error
Q9.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?for i in range(int(2.0)):
print(i)
A.
0.0 1.0
B.
0 1
C.
error
D.
none of the mentioned
View Answer
Correct Answer: 0 1
Q10.
लोकल वेरिएबल का नाम अंडरस्कोर से क्यों शुरू होता है?
Why does the name of local variables start with an underscore discouraged?
A.
To identify the variable
B.
It confuses the interpreter.
C.
It indicates a private variable of a class
D.
None of these
View Answer
Correct Answer: It indicates a private variable of a class
Q11.
निम्नलिखित में से किस की अभिव्यक्ति में सर्वोच्च प्राथमिकता है?
Which one of the following has the highest precedence in the expression?
A.
Division
B.
Subtraction
C.
Power
D.
Parentheses
View Answer
Correct Answer: Parentheses
Q12.
डेटाटाइम में कनवर्ट करने के लिए उपयोग किया जाने वाला फ़ंक्शन है:
The function used to convert to datetime is :
A.
Convert_todatetime()
B.
To_datetime()
C.
Datetime_to()
D.
Todate()
View Answer
Correct Answer: To_datetime()
Q13.
कौन सी List Index उपरोक्त List से 'red' मान का चयन करेगी
Which list index would select the value 'red' from the above listcolors = ["red", "green", "burnt sienna", "blue"]
View Answer
Correct Answer: 0
Q14.
आउटपुट क्या होगा
What will be the output ofsquares = {x: x*x for x in range(6)}
A.
[0, 1, 4, 9, 16, 25]
B.
[0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25]
C.
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
D.
Error 59. x = [10, [3.141, 20, [30, 'baz', 2.718]], 'foo']
View Answer
Correct Answer: {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
Q15.
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following Python code snippet?a = [0, 1, 2, 3]
for a[0] in a:
print(a[0])
A.
0 1 2 3
B.
0 1 2 2
C.
3 3 3 3
D.
error
View Answer
Correct Answer: 0 1 2 3
Q16.
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?
What will be the output of the following Python statement?"abcd"[2:]
View Answer
Correct Answer: cd
Q17.
आप वेरिएबल a को लंबाई 1 का टपल कैसे असाइन करते हैं?
How do you assign a tuple of length 1 to the variable a?
A.
a = (1,)
B.
a = 1,
C.
a = [1]
D.
a = tuple(1)
View Answer
Correct Answer: a = (1,)
Q18.
निम्नलिखित में से कौन सा Python में गलत वेरिएबल नाम है?
Which of the following is incorrect variable name in Python?
A.
variable_1
B.
variable1
C.
1variable
D.
_variable
View Answer
Correct Answer: 1variable
Q19.
निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of following Python code snippet?for i in range(0, -2, -1):
print(i)
A.
0, -1
B.
0, -1, -1
C.
-1, -2
D.
Error
View Answer
Correct Answer: 0, -1
Q20.
पाइथॉन लैंग्वेज में फाइल खोलने के लिए ......... फंक्शन का प्रयोग किया जाता है।
To open a file in python language ................. function is used.
A.
Begin()
B.
reate()
C.
Open()
D.
File()
View Answer
Correct Answer: Open()