What is wrong with my code


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

Replace this line with your code.


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":


Fill in the missing return statements for each branch.


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