+ 2

Challenge "Negative numbers"

All numbers, what you will input, must be converted in negative. Like module, but this is reversed module. Input [-9] - Output [-9] Input [-476] - Output [-476] Input [123] - Output [-123] Input [98] - Output [-98]

17th Feb 2018, 8:56 AM
РДтр0
7 Answers
+ 8
#You can even enter 5**2 #Python 3 print(-abs(eval(input()))) https://code.sololearn.com/cFoJgPWKf0aq/?ref=app
17th Feb 2018, 9:00 AM
Louis
Louis - avatar
17th Feb 2018, 9:04 AM
K.F
K.F - avatar
17th Feb 2018, 10:30 AM
РДтр0
0
-abs(x)
17th Feb 2018, 12:11 PM
VcC
VcC - avatar
18th Feb 2018, 3:06 PM
GoodOldTimes
GoodOldTimes - avatar