fixed grammar/articulation of certain sentences (#30508)

This commit is contained in:
Xiaojie(Aaron) Li
2019-05-16 03:34:44 -04:00
committed by The Coding Aviator
parent 1d77711431
commit c33260581b

View File

@ -1,7 +1,8 @@
---
title: Python Abs Function
---
`abs()` is a built-in function in Python 3, to compute the absolute value of any number. The absolute value of a number "means only how far a number is from 0" <sup>1</sup> It takes one argument `x`. The argument can even be a <a href='https://docs.python.org/3.0/library/cmath.html' target='_blank' rel='nofollow'>complex number</a>, or a <a href='https://en.wikipedia.org/wiki/Expression_(mathematics)' target='_blank' rel='nofollow'>mathematical expression</a>.
In Python 3,`abs()` is a built-in function that computes the absolute value of any number. The absolute value of a number "means only how far a number is from 0" <sup>1</sup> It takes one argument `x`, and the argument can even be a <a href='https://docs.python.org/3.0/library/cmath.html' target='_blank' rel='nofollow'>complex number</a>, in which case its <a href='http://www.mathcentre.ac.uk/resources/sigma%20complex%20number%20leaflets/sigma-complex9-2009-1.pdf' target='_blank' rel='nofollow'>modulus</a> is returned.
## Argument
@ -28,4 +29,4 @@ print(abs(3 - 4j - 3 - 4j)) # prints 8.0, because |(3 - 3) + (- 4j - 4j)| = 8.0
<a href='https://docs.python.org/3/library/functions.html#abs' target='_blank' rel='nofollow'>Official Docs</a>
### Sources
1. <a href='https://www.mathsisfun.com/numbers/absolute-value.html' target='_blank'>Math Is Fun. Accessed: October 25, 2017</a>
1. <a href='https://www.mathsisfun.com/numbers/absolute-value.html' target='_blank'>Math Is Fun. Accessed: October 25, 2017</a>