[Tutor] why does this not work

frederico Batista fred.f.bat at gmail.com
Wed Apr 24 05:27:04 CEST 2013


Dave, you clearly don't know codecademy.
Please be nice to him.
Also, I recommend the codecademy forums. They have a lot of material about
every exercise.
On Apr 23, 2013 11:50 PM, "Dave Angel" <davea at davea.name> wrote:

> On 04/23/2013 03:39 PM, Roelof Wobben 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." So can anyone explain to me what I did
>> wrong. Roelof
>>
>>
> Wrong?
> 1) your message is in html, not text.  So the formatting is messy.  It
> could have been worse, so please learn how to make your email program
> behave.
> 2) You didn't show your whole program.  If this is all you have in the
> file, then nothing will print because nothing calls your function.
> 3) You didn't describe your environment, including python version & OS.
>  And if Oscar's conjecture is correct, all bets are off because most of us
> won't be familiar with the strange environment.
> 4) I can't see how you could possibly get the message:
> 'It looks like output other than yes/no does not return "Sorry, I didn\'t
> understand you."'  And in fact the last part of the message is different
> than the literal in the program, so you've got a typo besides.  Please use
> cut&paste to show your actual code, your actual output.
>
> After reading oscar's comment, my guess is that codeacademy (not Python)
> is complaining about the period at the end of your last literal string.
>
> --
> DaveA
> ______________________________**_________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130424/48c02923/attachment.html>


More information about the Tutor mailing list