Did you create a function called shut_down? error


#1

I created the function but it keeps saying "Did you create a function called shut_down?"

def shut_down(s):

if yes:
    shut_down("Shutting down")
elif no:
    shut_down("Shut down aborted")
else:
    shut_down("Sorry")

`


#2

yes is written like an identifier (a variable name) when it should be a string. We need to compare it to s. Same with the next conditional.


#3

okay i fixed that and now it is saying
maximum recursion depth exceeded in cmp


#4

Did you write,

if s == "yes":

elif s == "no":

else:

?


#6

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