17. Review: Functions


#1

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
#2

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
    else:
        #Do This

#3


I have similar problem but with return pls help


#4

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


#5

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


#6

saved me the two hours


#8