Code is not working


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


a single equal sign means assign, you should check if s equals yes or no, to check if something is equal, use two equal signs


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