Python what does abs do? I have tried looking at different pages for help, however i cannot understand the jargon

Louis

I am a complete novice when it comes to Python and i just want to know what abs does. I have tried looking at different pages for help, however i cannot understand the jargon.

Thanks, Louis.

mhlester
>>> help(abs)
Help on built-in function abs in module __builtin__:

abs(...)
    abs(number) -> number

    Return the absolute value of the argument.

Also the documentation

If the number passed to the function is negative, it returns the positive. If it is positive, it returns it unchanged.

Think of it as removing the - negative sign.

>>> abs(2)
2
>>> abs(-2)
2
>>>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

An explanation of randint(2) < 1 in python, I cannot understand what the < 1 does

From Dev

What does this code do? I do not understand the syntax

From Dev

Eclipse cannot debug. Please help I tried everything

From Dev

I can't understand what is the instructor tried to solve in javascript?

From Dev

I do not understand what this code does(the code is about segues)

From Dev

What version of Python do I have?

From Dev

Can someone help me understand what I'm looking at and how and what I should use to expand my storage for my Ubuntu OS on my dual boot laptop

From Dev

Can someone help me understand what I'm looking at and how and what I should use to expand my storage for my Ubuntu OS on my dual boot laptop

From Dev

This is a common question, however I did not understand the answers

From Java

Why does my app keeps crashing when I press the submit button? I have tried a few different ways and nothing works

From Dev

Why do I have outdated man pages and what can I do about it?

From Dev

understand Array Object, and what I want to do is call my array in every class I have

From Dev

groupBy did not do what I expected, what am I looking for?

From Dev

I have a project where I have to print the averages in a table format however for different numbers it prints the table in two different ways

From Dev

Python: I do not understand this syntax

From Dev

What can I do if a repository/PPA does not have a Release file?

From Dev

I'm trying to understand what the algorithm does

From Dev

Why do two web pages have different localStorage? How can I fix this?

From Dev

FPDF - How can I have different pages with different sizes

From Dev

This javascript code is running properly without the for loop but not with it.Any help, I have tried everything

From Dev

namenode not running... i have already tried sudo chown -R username /usr/local/hadoop/ please help

From Dev

What do I not understand about APIs?

From Dev

I do not understand this PHP Code, what is it doing?

From Dev

JQuery , PHP and mySQL Help. I do not understand why this is not working

From Dev

I cannot understand function comparisons in Python

From Dev

I am new to firebase but have been using java script for a while but i don't understand what snap => does and why its used

From Dev

I have this bit of code that does exactly what I want, but it is slow. Hoping for pointers to help speed it up if possible

From Dev

What happens to compiled python packages if I do not have MKL libraries?

From Dev

What should I do about Python 2.7.9 not looking for SSL certificates in the right place on FreeBSD?

Related Related

  1. 1

    An explanation of randint(2) < 1 in python, I cannot understand what the < 1 does

  2. 2

    What does this code do? I do not understand the syntax

  3. 3

    Eclipse cannot debug. Please help I tried everything

  4. 4

    I can't understand what is the instructor tried to solve in javascript?

  5. 5

    I do not understand what this code does(the code is about segues)

  6. 6

    What version of Python do I have?

  7. 7

    Can someone help me understand what I'm looking at and how and what I should use to expand my storage for my Ubuntu OS on my dual boot laptop

  8. 8

    Can someone help me understand what I'm looking at and how and what I should use to expand my storage for my Ubuntu OS on my dual boot laptop

  9. 9

    This is a common question, however I did not understand the answers

  10. 10

    Why does my app keeps crashing when I press the submit button? I have tried a few different ways and nothing works

  11. 11

    Why do I have outdated man pages and what can I do about it?

  12. 12

    understand Array Object, and what I want to do is call my array in every class I have

  13. 13

    groupBy did not do what I expected, what am I looking for?

  14. 14

    I have a project where I have to print the averages in a table format however for different numbers it prints the table in two different ways

  15. 15

    Python: I do not understand this syntax

  16. 16

    What can I do if a repository/PPA does not have a Release file?

  17. 17

    I'm trying to understand what the algorithm does

  18. 18

    Why do two web pages have different localStorage? How can I fix this?

  19. 19

    FPDF - How can I have different pages with different sizes

  20. 20

    This javascript code is running properly without the for loop but not with it.Any help, I have tried everything

  21. 21

    namenode not running... i have already tried sudo chown -R username /usr/local/hadoop/ please help

  22. 22

    What do I not understand about APIs?

  23. 23

    I do not understand this PHP Code, what is it doing?

  24. 24

    JQuery , PHP and mySQL Help. I do not understand why this is not working

  25. 25

    I cannot understand function comparisons in Python

  26. 26

    I am new to firebase but have been using java script for a while but i don't understand what snap => does and why its used

  27. 27

    I have this bit of code that does exactly what I want, but it is slow. Hoping for pointers to help speed it up if possible

  28. 28

    What happens to compiled python packages if I do not have MKL libraries?

  29. 29

    What should I do about Python 2.7.9 not looking for SSL certificates in the right place on FreeBSD?

HotTag

Archive