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 Wartem
def determine_sign(num: int) -> str:
d = {1: "positive", 0: "zero", -1: "negative"}
return d.get((num > 0) - (num < 0), "zero")
Nov. 7, 2023
Comments: