From d13bb10ae78cf1ccfafe2de18a410843209971d4 Mon Sep 17 00:00:00 2001 From: Lukas Baumann Date: Wed, 17 Feb 2021 12:53:29 +0100 Subject: [PATCH] Create 4 - Digital Root.py --- 16/4 - Digital Root.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 16/4 - Digital Root.py diff --git a/16/4 - Digital Root.py b/16/4 - Digital Root.py new file mode 100644 index 0000000..803bcaa --- /dev/null +++ b/16/4 - Digital Root.py @@ -0,0 +1,5 @@ +def digitalRoot(n): + if n<10: + return n + else: + return digitalRoot(digitalSum(n))