What is wrong with my code


#1



def shut_down(s):
if true():
return "Shutting down"
elif no():
return "Shutdown aborted"
else:
return "Sorry"


Replace this line with your code.


#2

true() is not a function, and neither is no() We are expecting one of two strings, "yes" or "no". Anything else should result in the default branch executring.

if s == "yes":

elif s == "no":

else:

Fill in the missing return statements for each branch.


#4

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