day1/exercise/collatz.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 29 Dec 2009 19:01:43 +0530
changeset 332 f2ca851199d4
parent 64 333092b68926
child 354 5dc6c3673f9d
permissions -rw-r--r--
Changed few questions in day1quiz1 and added day 2 quiz.

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