Here is my pyhton practice program:
Couple of points:
if yes():It is wrong. You want to compare function input with yes. It should be
if s == 'yes':. Same for rest also.
def shut_down(s):, it is expecting one argument. You should pass one argument while calling this function as
ret = shutdown(yes)
def shut_down(s): if s == "yes": r = "Shutting down" elif s == "no": r = "Shutdown aborted" else: r = "Sorry" return r ret = shut_down("yes") print (ret)