day1/exercise/collatz.py
author Puneeth Chaganti <punchagan@fossee.in>
Sun, 10 Jan 2010 22:36:09 +0530
changeset 352 b44d7bcc6609
parent 64 333092b68926
child 354 5dc6c3673f9d
permissions -rw-r--r--
Added a few quiz questions; Minor edits.

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