page-banner
Chapter-9 NumPy Basics
Q1.
संख्याओं का अनुक्रम बनाने के लिए, NumPy रेंज के अनुरूप एक फ़ंक्शन प्रदान करता है जो सूचियों के बजाय सरणी लौटाता है।

To create sequences of numbers, NumPy provides a function …………… analogous to range that returns arrays instead of lists.
A. arrange
B. unpickling
C. range
D. None of these
View Answer
Q2.
ndarray को ऐरे के ................ नाम से भी जाना जाता है।

ndarray is also known as the ……………. array.
A. alias
B. arrange
C. unpickling
D. None of these
View Answer
Q3.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following?
import numpy as np
print(np.minimum([2, 3, 4], [1, 5, 2]))
A. [1 2 5]
B. [1 5 2]
C. [2 3 4]
D. [1 3 2]
View Answer
Q4.
NumPy ऐरे के डेटा प्रकार को खोजने के लिए किस विशेषता का उपयोग किया जाता है?

Which attribute is used to find the data type of numpy array?
A. type(array)
B. dtype
C. objects.type(array)
D. numpy(type)
View Answer
Q5.
निम्नलिखित कोड के लिए आउटपुट क्या होगा?

What will be output for the following code?
import numpy as np
a = np.array([1, 2, 1, 5, 8])
b = np.array([0, 1, 5, 4, 2])
c = a + b
c = c * a
print(c[2])
A. 6
B. 10
D. None of these
View Answer
Q6.
निम्नलिखित कोड के लिए आउटपुट क्या होगा?

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
Q7.
निम्नलिखित कोड के लिए आउटपुट क्या होगा?

What will be output for the following code?
import numpy as np
a = np.array([11, 2, 3])
print(a.min())
A. 2
B. 1
C. 11
D. 3
View Answer
Q8.
Numpy ऐरे की विशेषताएँ क्या हैं?

What are the attributes of numpy array?
A. shape, dtype, ndim
B. objects, type, list
C. objects, non vectorization
D. Unicode and shape
View Answer
Q9.
NumPY का मतलब है?

NumPY stands for?
A. Numbering Python
B. Number In Python
C. Numerical Python
D. None of the above
View Answer
Q10.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
print(a.shape)
A. (2, 3)
B. (3, 3)
C. (1,1)
D. None of these
View Answer
Q11.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2, 3]])
print(a.ndim)
A. 1
B. 2
C. 3
View Answer
Q12.
निम्नलिखित कोड का उद्देश्य क्या है?

What is the purpose of the following code?
import numpy as np
z = [1, 2, 3]
y = np.array(z)
A. to convert z to array
B. to convert z to list
C. Both of the above
D. None of the above
View Answer
Q13.
निम्नलिखित कोड का परिणाम क्या है?

What will be output for the following code?
import numpy as np
a = np.array([[1, 2, 3], [0, 1, 4], [11, 22, 33]])
print(a.size)
A. 1
B. 3
C. 9
D. 4
View Answer
Q14.
NumPy सारणी में प्रयुक्त zeros() फ़ंक्शन का उद्देश्य क्या है?

What is the purpose of zeros() function used in NumPy array?
A. सभी विकर्ण तत्वों 0 के साथ एक मैट्रिक्स बनाने के लिए / To make a matrix with all diagonal element 0
B. पहली पंक्ति 0 के साथ एक मैट्रिक्स बनाने के लिए / To make a matrix with first row 0
C. सभी तत्व 0 के साथ एक मैट्रिक्स बनाने के लिए / To make a matrix with all elements 0
D. उपरोक्त में से कोई नहीं / None of the above
View Answer
Q15.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following?
import numpy as np
a = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])
print(a[2, 2])
A. 7
B. 11
C. 10
D. 8
View Answer
Q16.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3, 5, 8])
b = np.array([0, 1, 5, 4, 2])
c = a + b
c = c * a
print(c[2])
A. 6
B. 24
D. None of these
View Answer
Q17.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2, 3]])
print(a.shape)
A. (2, 3)
B. (3, 1)
C. (1, 3)
D. None of these
View Answer
Q18.
निम्नलिखित का आउटपुट क्या होगा?

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])
A. 4
B. 5
C. 6
D. 7
View Answer
Q19.
निम्नलिखित का आउटपुट क्या होगा?

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
Q20.
निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following?
import numpy as np
a = np.array([2, 3, 4, 5])
b = np.arange(4)
print(a + b)
A. [2 3 4 5]
B. [3 4 5 6]
C. [1 2 3 4]
D. [2 4 6 8]
View Answer
Q21.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
y = np.array([[11, 12, 13, 14], [32, 33, 34, 35]])
print(y.ndim)
A. 1
B. 2
C. 3
View Answer
Q22.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3])
print(a.ndim)
A. 1
B. 2
C. 3
View Answer
Q23.
निम्नलिखित का आउटपुट क्या होगा?

What is the output of the following code?
import numpy as np
a = np.array([2, 3, 4, 5])
print(a.dtype)
A. int32
B. int
C. float
D. None of these
View Answer
Q24.
x का डेटाटाइप क्या है?

What is the datatype of x?
import numpy as np
a = np.array([1, 2, 3, 4])
x = a.tolist()
A. int
B. array
C. tuple
D. list
View Answer
Q25.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3, 5, 8])
b = np.array([0, 3, 4, 2, 1])
c = a + b
c = c * a
print(c[2])
A. 10
B. 21
C. 12
D. 28
View Answer
Q26.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6]])
print(a.shape)
A. (2, 3)
B. (3, 2)
C. (1, 1)
D. None of these
View Answer
Q27.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2, 3], [0, 1, 4]])
print(a.size)
A. 1
B. 5
C. 6
D. 4
View Answer
Q28.
Python में NumPy ऐरे में ones() फ़ंक्शन का क्या उपयोग है?

What is the use of the ones() function in NumPy array in Python?
A. सभी तत्व 1 के साथ एक मैट्रिक्स बनाने के लिए / To make a matrix with all element 1
B. सभी विकर्ण तत्वों 1 के साथ एक मैट्रिक्स बनाने के लिए / To make a matrix with all diagonal element 1
C. पहली पंक्ति 1 के साथ एक मैट्रिक्स बनाने के लिए / To make a matrix with first row 1
D. इनमें से कोई नहीं / None of these
View Answer
Q29.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of the following code?
import numpy as np
ary = np.array([4, 5, 6, 7, 8])
ary = ary + 1
print(ary[1])
A. 3
B. 4
C. 5
D. 6
View Answer
Q30.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3, 5, 8])
print(a.ndim)
B. 1
C. 2
D. 3
View Answer
Q31.
NumPy सरणियों का डिफ़ॉल्ट डेटा प्रकार क्या है?

What is the default data type of NumPy arrays?
A. int32
B. float64
C. object
D. None of the above
View Answer
Q32.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of the following code?
import numpy as np
a = np.arange(10)
print(a[2:5])
A. [2, 3, 4]
B. [0, 1, 2]
C. [5, 6, 7]
D. [2, 4, 6]
View Answer
Q33.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of the following code?
import numpy as np
a = np.array([[1, 2], [3, 4]])
print(a.ndim)
B. 1
C. 2
D. 3
View Answer
Q34.
NumPy में आइडेंटिटी मैट्रिक्स बनाने के लिए निम्नलिखित में से किसका उपयोग किया जाता है?

Which of the following is used to create an identity matrix in NumPy?
A. zeros()
B. ones()
C. arange()
D. eye()
View Answer
Q35.
NumPy ऐरे को नया आकार देने के लिए निम्नलिखित में से किसका उपयोग किया जाता है?

Which of the following is used to reshape a NumPy array?
A. reshape()
B. resize()
C. Both A and B
D. None of the above
View Answer
Q36.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of following code?
import numpy as np
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
c = np.stack((a, b))
print(c)
A. [[1 2 3] [4 5 6]]
B. [[1 4] [2 5] [3 6]]
C. [1 2 3 4 5 6]
D. Error
View Answer
Q37.
NumPy ऐरे में अधिकतम तत्व खोजने के लिए निम्नलिखित में से किसका उपयोग किया जाता है?

Which of the following is used to find the maximum element in a NumPy array?
A. max()
B. maximum()
C. amax()
D. All of the above
View Answer
Q38.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
c = a + b
print(c)
A. [1 2 3 4 5 6]
B. [[1 4] [2 5] [3 6]]
C. [5 7 9]
D. Error
View Answer
Q39.
निम्नलिखित कोड का परिणाम क्या है?

What is the output of the following code?
import numpy as np
a = np.array([1, 2, 3])
b = np.array([4, 5, 6])
c = np.concatenate((a, b))
print(c)
A. [[1 2 3] [4 5 6]]
B. [[1 4] [2 5] [3 6]]
C. [1 2 3 4 5 6]
D. Error
View Answer
Q40.
पायथन में NumPy का उद्देश्य क्या है?

What is the purpose of NumPy in Python?
A. एक शक्तिशाली n-dimensional ऐरे ऑब्जेक्ट प्रदान करने के लिए/To provide a powerful N-dimensional array object
B. ऐरे पर गणितीय संचालन करने के लिए फ़ंक्शन प्रदान करना/To provide functions for performing mathematical operations on arrays
C. C/C++ और Fortran कोड को एकीकृत करने के लिए उपकरण प्रदान करना/To provide tools for integrating C/C++ and Fortran code with Python
D. उपरोक्त सभी/All of the above
View Answer
Q41.
NumPy में मूल ndarray कैसे बनाया जाता है?

How is the basic ndarray created in NumPy?
A. np.array() फ़ंक्शन में Python सूची या टपल पास करके/By passing a Python list or tuple to the np.array() function
B. np.ndarray() कंस्ट्रक्टर फ़ंक्शन का उपयोग करके/By using the np.ndarray() constructor function
C. np.asarray() फ़ंक्शन का उपयोग करके पायथन सूची या टपल को ndarray में परिवर्तित करके/By converting a Python list or tuple to an ndarray using the np.asarray() function
D. np.zeros() या np.ones() फ़ंक्शंस का उपयोग करके क्रमशः शून्य या एक से भरी एक ऐरे बनाएं/By using the np.zeros() or np.ones() functions to create an array filled with zeros or ones, respectively
View Answer
Q42.
पायथन में NumPy का उद्देश्य क्या है?

What is the purpose of NumPy in Python?
A. संख्यात्मक गणना करने के लिए/To do numerical calculations
B. वैज्ञानिक कंप्यूटिंग करना/To do scientific computing
C. A और B दोनों/Both A and B
D. उपरोक्त में से कोई नहीं/None of the mentioned above
View Answer
Q43.
NumPy पैकेज ऐरे पर तेज़ संचालन करने में सक्षम है।

NumPy package is capable to do fast operations on arrays.
A. सही/True
B. गलत/False
C. कह नहीं सकते/Can’t Say
D. इनमें से कोई नहीं/None of these
View Answer
Q44.
पायथन में pip के संदर्भ में निम्नलिखित में से कौन सा सत्य है?

Amongst which of the following is true with reference to Pip in Python?
A. pip एक मानक पैकेज प्रबंधन प्रणाली है/Pip is a standard package management system
B. Python में लिखे गए सॉफ़्टवेयर पैकेजों को स्थापित और प्रबंधित करता है/It is used to install and manage the software packages written in Python
C. pip का उपयोग पायथन पैकेज को खोजने के लिए किया जा सकता है/Pip can be used to search a Python package
D. उपरोक्त सभी/All of the mentioned above
View Answer
Q45.
NumPy ऐरे ___ हो सकती हैं।

NumPy arrays can be ___.
A. Indexed
B. Sliced
C. Iterated
D. उपरोक्त सभी/All of the mentioned above
View Answer
Q46.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of following code?
import numpy as np
a=np.array([1,2,3,4,5,6])
print(a)
A. [1 2 3 4 5]
B. [1 2 3 4 5 6]
C. [0 1 2 3 4 5 6]
D. इनमें से कोई नहीं/None of the mentioned above
View Answer
Q47.
निम्नलिखित कोड का आउटपुट क्या है?

What is the output of following code?
import numpy as np
a = np.array([[0,1,2,3],[4,5,6,7],[8,9,10,11]])
b = a
print(b is a)
A. True
B. False
C. Can’t Say
D. None of these
View Answer
Q48.
ndim का उपयोग करके हम पा सकते हैं -

Using ndim we can find –
A. हम ऐरे का dimension पा सकते हैं/We can find the dimension of the array
B. ऐरे का आकार/Size of array
C. मैट्रिक्स पर परिचालन गतिविधियाँ/Operational activities on Matrix
D. उपरोक्त में से कोई नहीं/None of the mentioned above
View Answer
Q49.
NumPy किसके द्वारा विकसित किया गया?

NumPy developed by?
A. Guido van Rossum
B. Travis Oliphant
C. Wes McKinney
D. Jim Hugunin
View Answer
Q50.
NumPy में परिभाषित सबसे महत्वपूर्ण ऑब्जेक्ट एक N-dimension ऐरे प्रकार है जिसे कहा जाता है?

The most important object defined in NumPy is an N-dimensional array type called?
A. ndarray
B. narray
C. nd_array
D. darray
View Answer