def sign_fun(x):
'''
help-how to use it
'''
if type(x) != int:
raise ValueError("Error x")
if x >0:
return(1)
elif x<0:
return(-1)
else:
return(0)
a=sign_fun(-1)
print(a)
def sign_fun(x):
最新推荐文章于 2022-11-11 18:56:02 发布