Skip to content

Instantly share code, notes, and snippets.

@micaleel
Created November 1, 2013 17:31
Show Gist options
  • Save micaleel/7268875 to your computer and use it in GitHub Desktop.
Save micaleel/7268875 to your computer and use it in GitHub Desktop.
In line 4, you're calling the str methods lower() and upper() with arguments consequently causing an error. CodeAcademy should've given you a better error message, but they didn't :(
def shut_down(s):
if s == "Yes" or s == "yes" or s == "YES":
return "Shutting down"
elif s == "No" or s == s.lower("no") or s == s.upper("no"):
return "Shutdown aborted"
else:
return "Sorry, I don't understand you."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment