Re: [Tutor] ZeroDivisionError: float division

2007-10-06 Thread Alan Gauld
"pierre cutellic" <[EMAIL PROTECTED]> wrote > here is a a piece of code i can't debug: > > kx = (neighbor[1]+agent[1])/(dx-(neighbor[1]+agent[1])) > > in this line, 'neighbor[1]' and 'agent[1]' are both integers and > 'dx' is a > float so it gives me the following error: 'ZeroDivisionError: float

[Tutor] ZeroDivisionError: float division

2007-10-06 Thread pierre cutellic
Hi, i'm actually stuck with a stupid syntax problem. here is a a piece of code i can't debug: kx = (neighbor[1]+agent[1])/(dx-(neighbor[1]+agent[1])) in this line, 'neighbor[1]' and 'agent[1]' are both integers and 'dx' is a float so it gives me the following error: 'ZeroDivisionError: float div