I'm getting the following error - but everything looks right (I know we all say that)
Traceback (most recent call last):
File "python", line 13, in
File "python", line 2, in shut_down
TypeError: 'str' object is not callable
What is this error - 'str' object not callable within the context of this function? I've reviewed on stack exchange but didn't see anything that really applied to this function.
def shut_down(s): if s == "yes"(): return "Shutting down" elif s == "no"(): return "Shut down aborted" else: return "Sorry" s = raw_input("Do you want to shut down? Enter yes or no.").lower() str(s) print shut_down(s)