Refactor and calculate entropy.
import __future__ has to be at the beginning of the file.
Information definition is minus log when x is between 0 and 1.