whdans


SUBMITTED BY: rlawhdans

DATE: April 21, 2016, 6:23 p.m.

FORMAT: Text only

SIZE: 133 Bytes

HITS: 541

  1. # find sum of digits
  2. n=input("enter an integer : ")
  3. total=0
  4. foriinn:# string is iterable
  5. # print(i)
  6. total+=int(i)
  7. print(total)

comments powered by Disqus