Number Methods
Absolute Value
Absolute value means the distance of it from 0 in a number line.
In Python, you can calculate the absolute value of a number using the abs()
function.
print(abs(-1))
print(abs(1))
Absolute value means the distance of it from 0 in a number line.
In Python, you can calculate the absolute value of a number using the abs()
function.
print(abs(-1))
print(abs(1))