1
def
my_abs(x):
2
if x>=0:
3return x
4else:
5return -x
67 z=int(raw_input("Please Input The Number You Want To Get Abs: "))
8 y=my_abs(z)
9print y
' ref='nofollow'>Python练习2->Get Abs
原文:http://www.cnblogs.com/Curious-Python/p/4540141.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!