Review: Functions


I am stuck on the Review of Functions.

This is my code

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

But it says that i did not create the function shut_down

i expect that function shut_down is created because i used the def function_name():

Please help me :smiley:

Replace this line with your code.


It takes the parameter s, now by the directions, if s is equal to the string yes then you launch the first if return statement, elif s is equal to no you do the second return statement. Make sure to fix that.


even though i added in the
s == yes
s == no
parts, it still says that i haven't created the function shut_down


Remember that yes and no are going to be strings when they are passed into the function so you need to see if s == "yes" and then the same for no.




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