diff --git a/recursions/recursive_digit_sum.py b/recursions/recursive_digit_sum.py index 86d19da0b..8edea2b32 100644 --- a/recursions/recursive_digit_sum.py +++ b/recursions/recursive_digit_sum.py @@ -17,7 +17,8 @@ from __future__ import annotations def super_digit(n_str: str, repetitions: int) -> int: """ - Computes the super digit of a number formed by concatenating n_str repetitions times. + Computes the super digit of a number formed by concatenating + n_str repetitions times. Parameters: n_str (str): The string representation of the integer. @@ -34,6 +35,7 @@ def super_digit(n_str: str, repetitions: int) -> int: 9 """ + # Calculate the initial sum of the digits in n_str digit_sum = sum(int(digit) for digit in n_str)