revised digit-sum.py