"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 > division'.
So have you checked that the divisor is not zero? ie that (dx-(neighbor[1]+agent[1]) is not zero. That's normally the cause of a ZeroDivisionError. Without a bit more code or some debug output we can't really say much more. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor