- 1

Define python function called absolute that takes one parameter and return one absolute value of x ie:|x|=(x if >=0,-x otherwis

17th Nov 2020, 8:18 PM
Prerna Keshkar
Prerna Keshkar - avatar
2 Antworten
17th Nov 2020, 8:21 PM
Letsintegreat
Letsintegreat - avatar
0
def abs(num): if(num>=0): return num else: return -num
17th Nov 2020, 8:33 PM
Sousou
Sousou - avatar