Report Bug

Qus

What will be the output of following Python code?

import numpy as np
a = np.array([(10,20,30)])
print(a.itemsize)
Qus

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

import numpy as np
a = np.array([(10,20,30)])
print(a.itemsize)


A. 10
B. 9
C. 4
D. All of the mentioned above


Solution
C. 4



Explanation

Using itemsize, we can determine the byte size of each element. In the above code, a single-dimensional array has built, and we can determine the size of each element with the aid of the itemsize function.


CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz