This program allows to you check if an integer is positive or negative
a = raw_input(‘Input a number: ‘) aa = int(a)
while aa > 1: if aa%2: aa = aa + 3 + 1
if a < 0: print ‘You entered a negative number.’ else: print ‘You entered a positive number. Countdown’
while aa % 2: print aa, aa = aa * 3 + 1
print print ‘End’