Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I write this code:
size = input ("enter the size:")
newarray = zeros (size,Int) # To Create empty array ready to receive result
for i in range(0,size):
   item= input ("enter items:")
   newarray[i]=item
print newarray


There is an error, it tells me like this:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
n=zeros(size,Int)
NameError: name 'zeros' is not defined


Can any one help me in this error?
Posted
Updated 15-Sep-11 3:44am
v3

The error message seems reasonably clear; you are calling a function (zeros) which has not been defined.
 
Share this answer
 
i know that , now how i can fixed that ??
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900