# Number is Integer or Float - return Absolute Function | |
# A Codecademy Python (Review: Built-In Functions) assignment | |
# Dr. Steven B. Combs, coding novice | |
def distance_from_zero(a): | |
"""Integer or Float to Absolute""" | |
if type(a) == int or type(a) == float: | |
return abs(a) | |
else: | |
return "Not an integer or float!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment