Step-by-step explanation:
Remember, an absolute value is the non-negative value of a number in this case the integer.
First, using the abs() function. Here's an example:
# Some random integers
variableA = -308
variableB = 301
Second, # Get the absolute values of those integers
absA = abs(variableA)
absB = abs(variableB)
Next,
# Output the results
print("Absolute values of integers with `abs()`:")
print("|", variableA, "| = ", absA, sep="")
Finally,
Use abs(variableA-variableB):
In [1]: abs(-308-301)
Out[1]: 307