Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Integer Sign Determination by tokiojapan55
def determine_sign(num: int) -> str:
sign = lambda i: (i > 0) - (i < 0)
return ["negative", "zero", "positive"][sign(num) + 1]
Nov. 21, 2023
Comments: