Function to calculate the entropy of a String composed only of digits
Add output for tests