Python: Sum the Digits in an Integer
The code has been modified slightly and now uploaded to the site.
The questions are from the C++ Textbook.

26.py
value = int(input("Enter a number between 0 and 1000: "))
total = 0
# for (i = len(str(value)) - 1; i >= 0; i--){
startLen = len(str(value)) - 1
for i in range(startLen, -1, -1):
tmp = (str(value))[i]
total += int(tmp)
print("The sum of the digits is " + str(total))