有人可以在python 2.5中为我提供帮助吗? [英] Can any one help me in python 2.5?

查看:89
本文介绍了有人可以在python 2.5中为我提供帮助吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写这段代码:

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



有一个错误,它像这样告诉我:
回溯(最近通话最近):
在< module>
中的文件< pyshell#1>"第1行 n = zeros(size,Int)
NameError:未定义名称零"




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?

推荐答案

错误消息似乎很清楚;可以解决这个问题.您正在调用一个尚未定义的函数(zeros).
The error message seems reasonably clear; you are calling a function (zeros) which has not been defined.


我知道,现在我该如何解决??
i know that , now how i can fixed that ??


这篇关于有人可以在python 2.5中为我提供帮助吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆