abs()
Calculates the absolute value of the input.
Syntax
abs(
x)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
x | int, real, or timespan | ✔️ | The value to make absolute. |
Returns
Absolute value of x.
Example
print abs(-5)
Output
print_0 |
---|
5 |
Atsiliepimai
https://aka.ms/ContentUserFeedback.
Jau greitai: 2024 m. palaipsniui atsisakysime „GitHub“ problemų, kaip turiniui taikomo atsiliepimų mechanizmo, ir pakeisime jį nauja atsiliepimų sistema. Daugiau informacijos žr.Pateikti ir peržiūrėti atsiliepimą, skirtą