[Tutor] why does this not work

Oscar Benjamin oscar.j.benjamin at gmail.com
Tue Apr 23 22:42:53 CEST 2013


On 23 April 2013 21:17, Danny Yoo <dyoo at hashcollision.org> wrote:
> Hi Roelof,
>
> On Tue, Apr 23, 2013 at 1:39 PM, Roelof Wobben <rwobben at hotmail.com> wrote:
>> Im trying to learn python by a course at codeacademy.
>>
>> Now I have this code :
>>
>> def shut_down(s):
>>     s = s.lower()
>>     if s == "yes":
>>         return "Shutting down..."
>>     elif s == "no" :
>>         return "Shutdown aborted!"
>>     else:
>>         return "Sorry, I didn't understand you"
>>
>> But when I run it  I see this message:
>>
>> It looks like output other than yes/no does not return "Sorry, I didn't
>> understand you."
>
>
> What inputs are you testing?  What output do you get?
>
> You were doing fine, but summarized a little bit too much at the end.

I think that maybe the program is not running on the OP's computer but
on the codeacademy website
http://www.codecademy.com/#!/exercises/0
and that the message comes from the server that assesses the program.


Oscar


More information about the Tutor mailing list