Please help me. I just don't know what's wrong. Can someone show me what the new code is supposed to look like? Thank you.
I type in -6 because it asks for user input and then it always gives me this:
Traceback (most recent call last):
File "python", line 7, in
TypeError: not enough arguments for format string
The program is supposed to respond something like "You put in -6 and the absolute value is 6" but instead it gives me an error message
def distance_from_zero(a): if type(a) == float or type(a) == int: return abs(a) else: return "Nope" h = raw_input() print "You put in %s and the absolute value is %s" % h % distance_from_zero(h)