page-banner
Python M3-R5.1 MCQs SET-16
Q1.
पायथन में खाली सेट बनाने के लिए कौन से विकल्प सही हैं?

Which options are correct to create an empty set in Python?
A. {}
B. []
C. ()
D. Set ()
View Answer
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
Q3.
निम्नलिखित कोड का परिणाम क्या है

What is the output of the following code
x = 100
y = 50
print(x and y)
A. True
B. 100
C. False
D. 50
View Answer
Q4.
पायथन में टिप्पणियों को जोड़ने के लिए किस विशेष प्रतीक का उपयोग किया जाता है?

Which is the special symbol used in python to add comments?
A. $
B. //
C. /*………..*/
D. #
View Answer
Q5.
निम्नलिखित पायथन कोड का मूल्य क्या है

What is the value of the following Python code
print(36 / 4)
A. 36
B. 9.0
C. 9
D. 4.0
View Answer
Q6.
round (0.5) – round(-0.5) का नतीजा क्या है?

What is the result of round (0.5) – round(-0.5)?
A. 1.0
B. 2.0
D. 0.0
View Answer
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
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
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
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
Q11.
निम्नलिखित में से किस की अभिव्यक्ति में सर्वोच्च प्राथमिकता है?

Which one of the following has the highest precedence in the expression?
A. Division
B. Subtraction
C. Power
D. Parentheses
View Answer
Q12.
डेटाटाइम में कनवर्ट करने के लिए उपयोग किया जाने वाला फ़ंक्शन है:

The function used to convert to datetime is :
A. Convert_todatetime()
B. To_datetime()
C. Datetime_to()
D. Todate()
View Answer
Q13.
कौन सी List Index उपरोक्त List से 'red' मान का चयन करेगी

Which list index would select the value 'red' from the above list
colors = ["red", "green", "burnt sienna", "blue"]
A. "red"
C. 1
D. -4
View Answer
Q14.
आउटपुट क्या होगा

What will be the output of
squares = {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
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
Q16.
निम्नलिखित पायथन स्टेटमेंट का आउटपुट क्या होगा?

What will be the output of the following Python statement?
"abcd"[2:]
A. a
B. ab
C. cd
D. dc
View Answer
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
Q18.
निम्नलिखित में से कौन सा Python में गलत वेरिएबल नाम है?

Which of the following is incorrect variable name in Python?
A. variable_1
B. variable1
C. 1variable
D. _variable
View Answer
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
Q20.
पाइथॉन लैंग्वेज में फाइल खोलने के लिए ......... फंक्शन का प्रयोग किया जाता है।

To open a file in python language ................. function is used.
A. Begin()
B. reate()
C. Open()
D. File()
View Answer