Skip to content

Commit 519dc59

Browse files
authored
Merge pull request #1 from Karna98/Karna98-patch-1
Sum of digits of number using 'for' loop in python
2 parents 95e4788 + 12f029b commit 519dc59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Math/sum_of_digits/sum_of_digits_python.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
sum = 0
33

44
for loop_variable in number:
5-
s += int(loop_variable)
5+
sum += int(loop_variable)
66

7-
print(s)
7+
print(sum)

0 commit comments

Comments
 (0)