Please help


#1



REVIEW: FUNCTIONS

syntext error line 2


def shut_down(s):
    if  
    s=="yes" 
    return "shutting down"
    elif s=="no"
    return "shutdown aborted"
    else: 
        return "sorry"


#2

 if  
    s=="yes

write it as...

if condition:
    your code

also indent your code properly..

if condition1:
    #your code1
elif condition2:
    #your code
else:
    #yourcode

#3

well i fixed it
and now it returns syntext error line 3
and this is the code:
def shut_down(s):
if s=="yes":
return "shutting down"
elif s=="no":
return "shutdown aborted"
else:
return "sorry"


#4

nevermind
it worked
thank you


#5

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