entropy.py calculated the entropy