17. Review: Functions


I saw in other questions how the syntax is supposed to look, but here is what I originally wrote:

I have two questions:

First, by writing if shut_down("yes"), am I not saying if s is equal to yes?

Second, I receive an error 'return' outside function. What does this mean?

Thank you!

Review functions, error: "maximum recursion depth exceeded

You can't use return outside of a function. Your indentation is wrong, and you need logic in your statements. It also needs to be condensed into your function.

def shut_down(input):
    if (shut_down == ""):
        #Do This
    elif (shut_down == ""):
        #Do This
        #Do This


I have similar problem but with return pls help


Remove the return s at the start, once you return the function stops.


This is accurate answer , It takes more than 2hours before find ... like you put return in condition you don't need to put it in straig after def


saved me the two hours