Instruction Error on Python "17. Review: Functions"


#1



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.


#2

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:


#3

I'm on the same lesson and I'm pretty sure i did it correct. Can you tell me if theres anything wrong?
codecademy-discourse.s3.amazonaws.com/original/5X/9/4/3/d/943d29774137c32afa2abcb946784125ab75df4e.png


#4

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.


#5

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


#6

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


#7

Hey there, this way it worked for me:


#8

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.


#9

Thank you, i got it :slight_smile:


#11

Thank you ! It does work!


#12

Your welcome. :slight_smile:


#13

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