Review: functions


#1

Hi,
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"
else:
return "sorry"
print shut_down("No")


Review: Functions
#2

string comparison is case sensitive, no currently results in sorry


#3

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