20
loading...
This website collects cookies to deliver better user experience
Abs()
is a built-in function that returns the absolute value of the argument.print(abs(-10))
#Output = 10
abs()
built-in function. There are other methods to do this as well, however, since abs()
is an inbuilt method we recommend using it. #Absolute value Python
abs(number)
#Absolute Value Python
#abs() on Integer values
print(abs(-10))
#abs() on Float values
print(abs(-10.10))
#abs() on Complex numbers
print(abs(10-10j))
10
10.1
14.142135623730951
abs()
method is used to display the value