Program Console Vignaankosh.com
Execution Panel
Console is empty.
Digital Root (repeated sum until single digit) is an interactive PYTHON dry run visualizer from the Recursion programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
def sum_of_digits(n):
if n < 10:
return n
return (n % 10) + sum_of_digits(n // 10)
def digital_root(n):
single_sum = sum_of_digits(n)
if single_sum < 10:
return single_sum
return digital_root(single_sum)
num = 9875
print(f"Number: {num}")
print(f"Digital Root: {digital_root(num)}")