From 4bdca34c81f8a606ef8a16b7faa0c02e739508ba Mon Sep 17 00:00:00 2001 From: Lukas Baumann Date: Wed, 17 Feb 2021 13:01:44 +0100 Subject: [PATCH] Create 6 - Hailstone --- 16/6 - Hailstone | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 16/6 - Hailstone diff --git a/16/6 - Hailstone b/16/6 - Hailstone new file mode 100644 index 0000000..37535b7 --- /dev/null +++ b/16/6 - Hailstone @@ -0,0 +1,5 @@ +def hailstone(n): + print(n) + if n != 1: + if n%2: hailstone(3*n+1) + else: hailstone(n//2)