How to Solve NameError: name 'division' is not defined -- __future__

Solution: Import the 'division' module

To Solve the error, add the following line to the top of your code.

from __future__ import division

 

For more information:
Python __future__ division