Review: Functions


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

Traceback (most recent call last):

File "python/", 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"
        return "Sorry"
<img src="//" width="690" height="431">


remove bracket from if elif

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


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

#4 have to add : not (Fullwidth Colon)
have a close look at both

: not


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


check all the red color have to remove that areas


Thank you, that solves the problem.


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


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


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


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?


are you talking about this?


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


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

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


yes please help me to check it


isn't your code working ?


no, I'm afraid not sir


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