Define a function called signOf that takes a parameter containing an integer value and returns a 1 if the parameter is positive, 0 if the parameter is 0, and -1 if the parameter is negative.
def signOf(int):
if int>0:
return 1
elif int==0:
return 0
else:
return -1
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.