Review: Functions


#1




Is it a system error? This keeps on showing up:

Traceback (most recent call last):

File "python/cli_runner.py", line 152, in


Can sombody please check this out for me? It's been like this for a while.


def shut_down(s):
    if (s=="yes"):      
        return "Shutting down"
    elif (s=="no"):
        return "Shutdown aborted"
    else:
        return "Sorry"
        
<img src="//codecademy-discourse.s3.amazonaws.com/original/5X/e/e/2/c/ee2cd15fdc2e1c64607eec669d332dc43885cbe5.png" width="690" height="431">


#2

remove bracket from if elif

and you used Unicode Character “:” (U+FF1A)(Fullwidth Colon) for your elif and else
remove that
use : instead


#3

Isn't the ‘:’ should be added at the end?


#4

no.you have to add : not (Fullwidth Colon)
have a close look at both

: not


#5

'
still, there's this error
Are you saying replace the colon at the end with ':'
(I copy and pasted your colon)


#6

check all the red color places.you have to remove that areas


#7

Thank you, that solves the problem.


#8

you are welcome....... :slight_smile:


#9

Can you please me check out my other problem with 'Iterating over a list in a function', that will be really helpful.


#10

if you've a new problem then create a topic for it and tell us what's you problem :slight_smile:

someone will definitely help you :slight_smile: i also if i can


#11

I've created the topic already, I cannot really understand the previous person's response.
I believe you can see the problem when you click on my username?


#12


are you talking about this?


#13

yes it is, can you help me check the problem?


#14

check that again......... :slight_smile:

and yet if you have a question then don't hesitate to ask :slight_smile:


#15

yes please help me to check it


#16

isn't your code working ?


#17

no, I'm afraid not sir


#18

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