diff --git a/16/3 - Digital Sum.py b/16/3 - Digital Sum.py new file mode 100644 index 0000000..dda5ff4 --- /dev/null +++ b/16/3 - Digital Sum.py @@ -0,0 +1,5 @@ +def digitalSum(n): + if n < 10: + return n + else: + return digitalSum(n//10) + n%10