Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/abs.py Secret

Created March 5, 2021 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/dffa57700bcd5a56c0f805c1b124e78f to your computer and use it in GitHub Desktop.
Save parzibyte/dffa57700bcd5a56c0f805c1b124e78f to your computer and use it in GitHub Desktop.
# Con la función "abs" de valor absoluto también es posible
numero_negativo = -100
positivo = abs(numero_negativo)
print(
f"El número negativo es {numero_negativo} y convertido a positivo con abs es {positivo}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment