Functions review recusion error


def shut_down(s):

if shut_down(s):
    s == "Yes"
    return "Shutting down"
    s == "no"
    return "Shutdown Aborted"
    return "Sorry"

I have looked through many other posts to see what i was doing wrong and fixed what I could, but after those fixes I started receiving the error : "Oops, try again. Your shut_down function threw the following error: maximum recursion depth exceeded".


This seems to be your problem. Take out shutdown(s); and try molding it just using s = "yes" like your elif statement.


the elif statement leads to an invalid syntax @sharon1976


thanx you are the best :smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.