[ARRAY] GETTING INPUT FROM USER IN NUMPY ONE DIMENSIONAL ARRAY USING FOR LOOP

 


from numpy import*
n=int(input('Enter elements:\t'))
ks=zeros(n,dtype=int)
for i in range(n):
p=int(input('Enter subjects marks\t'))
ks[i]=p
print(ks)

Comments

Popular posts from this blog

React Installation with Vite and Tailwind css (Steps to Installation)

Insert Data In mongoDb

Class methods as an alternative Constructor