Instruction Error on Python "17. Review: Functions"


Python 17. Review: Functions

Not really an issue that I'm having, but I copied and pasted the example and ran it and it failed so it may not exemplify what actually needs to be done on this particular exercise. I pasted a screen shot below.

Replace this line with your code.


The example is there for reference as it says below the code. it was not meant to be copied and pasted. Delete the example code and try what the instructions say for you to do. If you have a problem after that message me, and I'll try to help. :slight_smile:


I'm on the same lesson and I'm pretty sure i did it correct. Can you tell me if theres anything wrong?


I believe your yes and no need "" so that they are recognized as text, also you might need your argument to be s not n as it says to use s.


Yes and no should be strings, so they need quotes around them in the if elif statements.


hi,i got some problems in this part, but i don't where is wrong,coul you give some advice.thank you !


Hey there, this way it worked for me:


Hi! I found your problem. The way you write your return statements for your if elif is wrong. Codecademy wants you to return a string for each if elif statement like this:

return "String"

Not sure why you put it in shut_down() but its causing the error. Delete the shut down part of each return statement.


Thank you, i got it :slight_smile:


Thank you ! It does work!


Your welcome. :slight_smile:


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