In Python
2. Make your own absolute value function, using an if statement: abs (-5)5 abs (23)23 Show transcribed image text 2. Make your own absolute value function, using an if statement: abs (-5)5 abs (23)23
Answer
def abs(n): if n < 0: return -1 * n else: return nprint(abs(-5))print(abs(23))
23 Process finished with
OR
OR