0

Wtite a statement in python to find absolute value of -100

phyton

30th Aug 2018, 2:28 PM
Abhinaya
Abhinaya - avatar
5 Réponses
+ 3
Bebida Roja In python that would be def abs(x): return -x if x < 0 else x
30th Aug 2018, 3:25 PM
Anna
Anna - avatar
+ 1
print(abs(-100))
30th Aug 2018, 2:56 PM
Sam Pache
Sam Pache - avatar
+ 1
You could have asked this to Google.
30th Aug 2018, 3:01 PM
Шащи Ранжан
Шащи Ранжан - avatar
+ 1
thanks
30th Aug 2018, 4:03 PM
Abhinaya
Abhinaya - avatar
0
def Abs(x): return (x<0 ? -x : x)
30th Aug 2018, 2:59 PM
Bebida Roja
Bebida Roja - avatar