Q1.
निम्न में से कौनसा Python tuple है ?
Which of the following is a Python tuple?
A.
[1, 2, 3]
B.
(1, 2, 3)
C.
{1, 2, 3}
D.
{}
View Answer
Correct Answer: (1, 2, 3)
Q2.
नीचे दिए गए कोड स्निपेट में var का डेटा टाइप क्या होगा?
What will be the datatype of the var in the below code snippet?var = 10
print(type(var))
var = "Hello"
print(type(var))
A.
Str and int
B.
int and int
C.
str and str
D.
int and str
View Answer
Correct Answer: int and str
Q3.
इनमें से कौन कोर डेटा टाइप नहीं है?
Which of these is not a core data type?
A.
Lists
B.
Dictionary
C.
Tuples
D.
Class
View Answer
Correct Answer: Class
Q4.
पायथन में एक कोड ब्लॉक कैसे इंगित किया जाता है?
How is a code block indicated in Python?
A.
Brackets
B.
Indentation
C.
Key
D.
None of the above
View Answer
Correct Answer: Indentation
Q5.
निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?
What will be the output of the following code snippet?a = [1,2,3,4,5,6,7,8,9]
a[::2] = 10,20,30,40,50,60
print(a)
A.
ValueError: attempt to assign sequence of size 6 to extended slice of size 5
B.
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
C.
[1, 2, 10, 20, 30, 40, 50, 60]
D.
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
View Answer
Correct Answer: ValueError: attempt to assign sequence of size 6 to extended slice of size 5
Q6.
निम्नलिखित List में फेरबदल करने के लिए सही command क्या है?
What is the correct command to shuffle the following list?fruit = ['apple', 'banana', 'papaya', 'cherry']
A.
fruit.shuffle()
B.
shuffle(fruit)
C.
random.shuffle(fruit)
D.
random.shuffleList(fruit)
View Answer
Correct Answer: random.shuffle(fruit)
Q7.
नीचे दिए गए कथनों में से कौन सा/से सत्य है/हैं?
Which of the following statements given below is/are true?
A.
Tuples have structure; lists have an order.
B.
Tuples are homogeneous, lists are heterogeneous
C.
Tuples are immutable, lists are mutable
D.
All of them.
View Answer
Correct Answer: Tuples are immutable, lists are mutable
Q8.
निम्नलिखित कोड का आउटपुट क्या है:
What is the output of the following code:L = ['a','b','c','d']
print("".join(L))
A.
Error
B.
None
C.
abcd
D.
['a','b','c','d']
View Answer
Correct Answer: abcd
Q9.
कोड प्रिंट का आउटपुट क्या है (9//2)
What is the output of the code print (9//2)
A.
4.5
B.
4.0
C.
4
D.
Error
View Answer
Correct Answer: 4
Q10.
निम्नलिखित प्रोग्राम का आउटपुट क्या है:
What is the output of the following program:i = 0
while i < 3:
print(i)
i = i + 1
print(i + 1)
A.
0 2 1 3 2 4
B.
0 1 2 3 4 5
C.
Infinite loop
D.
0 1 2 3
View Answer
Correct Answer: 0 2 1 3 2 4
Q11.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?t = (1, 2, 4, 3)
t[1:3]
A.
(1, 2)
B.
(1, 2, 4)
C.
(2, 4)
D.
(2, 4, 3)
View Answer
Correct Answer: (2, 4)
Q12.
निम्नलिखित पायथन कोड मान्य है?
Is the following Python code valid?a, b, c = 1, 2, 3
a, b, c
A.
Yes, [1,2,3] is printed
B.
No, invalid syntax
C.
Yes, (1,2,3) is printed
D.
1 is printed
View Answer
Correct Answer: Yes, (1,2,3) is printed
Q13.
निम्नलिखित में से कौन सा पायथन में डेटा प्रकार नहीं है?
Which of the following is not a data type in python?
A.
String
B.
numbers
C.
Slice
D.
List
View Answer
Correct Answer: Slice
Q14.
पीवीएम को अक्सर _________ कहा जाता है।
PVM is often called _________.
A.
Python Interpreter.
B.
Python compiler
C.
Python Volatile machine
D.
Portable virtual machine
View Answer
Correct Answer: Python Interpreter.
Q15.
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code?a = (1, 2)
b = (3, 4)
c = a + b
print(c)
A.
(4,6)
B.
(1,2,3,4)
C.
Error as tuples are immutable
D.
None
View Answer
Correct Answer: (1,2,3,4)
Q16.
डिक्शनरी में है:
Dictionary has:
A.
Sequence value pair
B.
Key value pair
C.
Tuple value pair
D.
Record value pair
View Answer
Correct Answer: Key value pair
Q17.
Set के बारे में इनमें से कौन सा सत्य नहीं है?
Which of these about a set is not true?
A.
Mutable data type
B.
Does not allow duplicate values
C.
Data type with unordered values
D.
Immutable data type
View Answer
Correct Answer: Immutable data type
Q18.
for i in range (-5,0,1) चलेगा
for i in range (-5,0,1) will run
A.
4 times
B.
5 times
C.
6 times
D.
3 time
View Answer
Correct Answer: 5 times
Q19.
कौन सा सच नहीं है:
Which is not true:
A.
a,b,c=5,4,3
B.
x=[10,5,4,6]
C.
d={}
D.
5=a
View Answer
Correct Answer: 5=a
Q20.
निम्नलिखित में से किस फ़ंक्शन का उपयोग एक numpy array में तत्वों की कुल संख्या का पता लगाने के लिए किया जाता है
Which of the following function is used to find the total number of elements in a numpy array
A.
type
B.
ndims
C.
size
D.
shape
View Answer
Correct Answer: size