diff options
Diffstat (limited to 'day1/exercise/collatz.py')
-rw-r--r-- | day1/exercise/collatz.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/day1/exercise/collatz.py b/day1/exercise/collatz.py index 7bed967..3ace3ac 100644 --- a/day1/exercise/collatz.py +++ b/day1/exercise/collatz.py @@ -1,10 +1,8 @@ a = int( raw_input( 'Enter number: ') ) while a != 4: - print a + print a, if a % 2 == 1: a = a * 3 + 1 else: a /= 2 -print 4 -print 2 -print 1 +print 4, 2, 1 |