Review: functions


I dont understand why I keep getting following error. Could anyone help me on this?

"Oops, try again. Your function failed on the message no. It returned 'sorry' when it should have returned 'Shutdown aborted'

My code is:
def shut_down(s):
if s == "yes":
return "Shutting down"
elif s == "No":
return "Shutdown aborted"
return "sorry"
print shut_down("No")

Review: Functions

string comparison is case sensitive, no currently results in sorry


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