I inspected the code a lot of times, but i dont see any mistakes here is my problem: Your shut_down function threw the following error: maximum recursion depth exceeded
Here is my code:
if shut_down(s) == "yes":
return "Shutting Down";
elif shutdown() == "No":
return "Shutdown aborted";
how do you call the function?
calling a function inside a function can be dangerous. s, the function parameter, will hold the string, you should compare s with yes and no.
Not the function itself, that will not work
And you could add a function call after your function
i crafted a new code , but i got other problem here is my code :def shut_down(s):** return s;**** if shut_down('Yes'):**** return "Shutting Down";**** elif shutdown('No'):**** return "Shutdown aborted";**** else:**** return "Sorry"**print shut_down('yes');
here is my problem:Your function failed on the message yes. It returned 'yes' when it should have returned 'Shutting down'
please work on your markup:
As for your error message, the function ends the moment a return keyword is reached
I also said you should compare s (the function parameter) with 'yes':
s == 'yes':
same for no, obviously
Thanks for the help , i really appriciate it , i completed it