标签:
1 def my_abs(x): 2 if x>=0: 3 return x 4 else: 5 return -x 6 7 z=int(raw_input("Please Input The Number You Want To Get Abs: ")) 8 y=my_abs(z) 9 print y
Python练习2->Get Abs
原文地址:http://www.cnblogs.com/Curious-Python/p/4540141.html