day1/exercise/collatz.py
changeset 386 a0bec380b44f
parent 354 5dc6c3673f9d
child 425 5afcfce15e71
--- a/day1/exercise/collatz.py	Fri Apr 23 08:49:25 2010 +0530
+++ b/day1/exercise/collatz.py	Tue Apr 27 12:14:30 2010 +0530
@@ -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