作者kdjf (我抓得到什麽呢?)
看板Python
标题Re: [问题] def的问题
时间Mon Jun 17 18:05:08 2013
你定义了函数,没有执行它阿...
: def move():
: def move_limit():
: xmin=1
: xmax=2
: ymin=1
: ymax=2
: return self.bnd(xmin,xmax,ymin,ymax)
: def bnd(self,*arg):
: spatial_limit=(sqrt((arg[1]-arg[0])^2+(arg[3]-arg[2])^2))*(1/3)
: tolerance=spatial_limit/8
: return spatial_limit,tolerance
lim,tor=move_limit()
: print lim
: print tor
:
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.245.32
1F:推 MAGICXX:喔喔~@@!!感谢~ 06/17 18:06