Python Absolute Value

Are you positive you know how to find this?

Photo by on

Absolute value is often described with a rather complex equation. In words, it states that the absolute value of x is equal to x if x is greater than or equal to zero, and it’s equal to minus x if x is less than zero.

Whew! Here’s how this is often expressed symbolically:

Simpler is better!

--

--

Author, inventor, entrepreneur — passionate about alternate energy, technology, and how Python programming can help you hack your life.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
John Clark Craig

Author, inventor, entrepreneur — passionate about alternate energy, technology, and how Python programming can help you hack your life.