Answers for "abs() absolute"

-1

abs() absolute

# random integer
integer = -20
print('Absolute value of -20 is:', abs(integer))

#random floating number
floating = -30.33
print('Absolute value of -30.33 is:', abs(floating))
Posted by: Guest on June-01-2021
-2

abs() absolute

# random integer
integer = -20
print('Absolute value of -20 is:', abs(integer))

#random floating number
floating = -30.33
print('Absolute value of -30.33 is:', abs(floating))

Results
Absolute value of -20 is: 20
Absolute value of -30.33 is: 30.33
Posted by: Guest on June-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language