# 1302.py def segno (x): if x>0: return 1 elif x==0: return 0 else: return -1 for x in (-2,0,3,4,-6): print segno(x), print # -1 0 1 1 -1