The solar system simulator (part 6) crashes if two planets happen to have zero distance between them. Here's the error message Python generates:
$ python simulator.py
Traceback (most recent call last):
File "simulator.py", line 144, in <module>
calculateMovement()
File "simulator.py", line 66, in calculateMovement
nDirection = (direction[0] / magnitude, direction[1] / magnitude) # Normalis
ed Vector pointing in the direction of the force
ZeroDivisionError: float division by zero
The solar system simulator (part 6) crashes if two planets happen to have zero distance between them. Here's the error message Python generates: