Routine Name: Abserr
Author: David Merkley
Language: Python
Description/Purpose: Finds the absolute error of the inputs
Input: exact and approximate
Output: Absolute error
Implementation/Code:
def abserr(xexact, xapprox):
output = abs(xexact - xapprox)
return output
def main():
exact = input("Enter a number:")
approx = input("Enter a number that is close to the last one:")
exact = float(exact)
approx = float(approx)
print(abserr(exact, approx))
main()