programming-examples/python/Math/Calculate the absolute value of a floating point number.py
2019-11-15 12:59:38 +01:00

6 lines
118 B
Python

import math
print(math.fabs(-2.1))
print(math.fabs(-0.0))
print(math.fabs(10.1))
print(math.fabs(0.0))