dig-calc.py 225 B

12345678910
  1. #!/usr/bin/python3
  2. print('Wellcome to the digits calculator')
  3. number = input('Type a some digits number: ')
  4. sum = 0
  5. for iterator in range(len(number)):
  6. sum += int(number[iterator])
  7. print( 'Your sum is: ' + str( sum ) )