Skip to content

Commit a40103f

Browse files
Merge pull request matthewsamuel95#427 from AashishChakravarty/math-problems
digit of sum python program
2 parents ed2d1f5 + 1bd0b30 commit a40103f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Math/sum_of_digits/digit_sum.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
n="12345"
2+
sum=0
3+
for i in range(len(n)):
4+
sum+=int(n[i])
5+
print(sum)

0 commit comments

Comments
 (0)