Answers for "set value to negative python"

0

python set negative infinity

# Define Negative infinity number
ntive_inf = float('-inf')
print('Negative Infinity: ',ntive_inf)
Posted by: Guest on January-12-2021
4

convert negative to positive in python

>>> n = -42
>>> -n       # if you know n is negative
42
>>> abs(n)   # for any n
42
>>> abs(-5.05)
5.05
Posted by: Guest on October-27-2020

Code answers related to "set value to negative python"

Python Answers by Framework

Browse Popular Code Answers by Language