day1/exercise/collatz.py
author Puneeth Chaganti <punchagan@fossee.in>
Sun, 10 Jan 2010 18:06:40 +0530
changeset 349 58366fe3839b
parent 64 333092b68926
child 354 5dc6c3673f9d
permissions -rw-r--r--
Moved quiz files into day folders.

a = -1
while a > 1:
    print a
    if a % 2:
        a = a * 3 + 1
    else:
        a /= 2