Can't figure this problem out


#1

def shut_down(s):
return s
if yes():
return shut_down("Shutting down")
elif no():
return shut_down("Shutdown aborted")
else:
return shut_down("Sorry")


#2

Can you include your error message and the url to the exercise? :smile:


#3

The return statement should be just a string, not a recursive function call. This is setting up an infinite loop.

return "Shutting down"

#4

which problem is this


#5

so what should i do? this is problem #17 of functions


#6

mtf suggested instead of return shut_down("Shutting down") to instead do just return "Shutting down" inside of your else statement because you just need to return instead of set up the loop like he said. You need to fix it for all of them I believe.


#7

cool but it still didn't work for me


#8

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