def my_ads(x):
if not isinstance(x,(int,float)):
print('param tyope error.')
return none
if x>=0:
return x
else:
return -x
print(my_abs(123))
param type error.
None
调用时函数名错误,应该是print(my_ads(123))