def asBinary(i):
 if (i > 1):
  if ((i % 2) == 1):
   return (asBinary((i >> 1)) + '1')
  else:
   return (asBinary((i >> 1)) + '0')
 else:
  return str(i)

def asBinary ( i ) : if ( i > 1 ) : if ( ( i % 2 ) == 1 ) : return ( asBinary ( ( i >> 1 ) ) + '1' ) else : return ( asBinary ( ( i >> 1 ) ) + '0' ) else : return str ( i )
produces a string from an integers binary representation .