Re: [Tutor] why does this not work

2013-04-24 Thread frederico Batista
Well then, sorry about it Dave.
My bad.
 On Apr 24, 2013 5:05 AM, "Alan Gauld"  wrote:

> On 24/04/13 04:27, frederico Batista wrote:
>
>> Dave, you clearly don't know codecademy.
>> Please be nice to him.
>>
>
> To be fair to Dave he was very polite and showed the OP all the things
> that were needed to enable the users of this forum to help him. Very few of
> us are familiar with codeacademy - indeed until this thread I don't think
> I've come across it before. I certainly didn't know it
> had its own runtime environment.
>
>  Also, I recommend the codecademy forums. They have a lot of material
>> about every exercise.
>>
>
> Posting in the most specific forum is always best so if the issue is with
> codeacademy that would be the best place. But I guess it would be hard for
> the OP to figure out if his problem is with Python or with Codeacademy...
>
>  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
>>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-24 Thread Roelof Wobben

Thanks for all the remarks.

The problem was indeed a missing . at the end.

Roelof

> To: tutor@python.org
> From: alan.ga...@btinternet.com
> Date: Wed, 24 Apr 2013 09:00:36 +0100
> Subject: Re: [Tutor] why does this not work
> 
> On 24/04/13 04:27, frederico Batista wrote:
> > Dave, you clearly don't know codecademy.
> > Please be nice to him.
> 
> To be fair to Dave he was very polite and showed the OP all the things 
> that were needed to enable the users of this forum to help him. Very few 
> of us are familiar with codeacademy - indeed until this thread I don't 
> think I've come across it before. I certainly didn't know it
> had its own runtime environment.
> 
> > Also, I recommend the codecademy forums. They have a lot of material
> > about every exercise.
> 
> Posting in the most specific forum is always best so if the issue is 
> with codeacademy that would be the best place. But I guess it would be 
> hard for the OP to figure out if his problem is with Python or with 
> Codeacademy...
> 
> > 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
> 
> -- 
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> 
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
  ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-24 Thread Alan Gauld

On 24/04/13 04:27, frederico Batista wrote:

Dave, you clearly don't know codecademy.
Please be nice to him.


To be fair to Dave he was very polite and showed the OP all the things 
that were needed to enable the users of this forum to help him. Very few 
of us are familiar with codeacademy - indeed until this thread I don't 
think I've come across it before. I certainly didn't know it

had its own runtime environment.


Also, I recommend the codecademy forums. They have a lot of material
about every exercise.


Posting in the most specific forum is always best so if the issue is 
with codeacademy that would be the best place. But I guess it would be 
hard for the OP to figure out if his problem is with Python or with 
Codeacademy...



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


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-23 Thread frederico Batista
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"  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@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-23 Thread Dave Angel

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@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-23 Thread Oscar Benjamin
On 23 April 2013 21:17, Danny Yoo  wrote:
> Hi Roelof,
>
> On Tue, Apr 23, 2013 at 1: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."
>
>
> 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
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-23 Thread Danny Yoo
Hi Roelof,

On Tue, Apr 23, 2013 at 1: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."


What inputs are you testing?  What output do you get?

You were doing fine, but summarized a little bit too much at the end.
Unlikely as it might seem, those details might matter, or at the very
least may help us discount certain possibilities.  Can you show us how
you're testing it?


(One of those "silly" possibilities: the function you're calling might
not be the function you've defined.  You call your function
shut_down(), but given that underscore, maybe you've defined a
function "shutdown" by accident?  It's those sort of niggling details
we need to discount; without seeing how you're doing your testing, we
have to leave that distant possibility open.)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-23 Thread Mark Lawrence

On 23/04/2013 20:39, 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


PEBKAC or PEBCAK? :)

c:\Users\Mark\MyPython>type b.py
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"

for s in 'what', 'the', 'heck?', 'YES', 'NO', 'works', 'okay', 'for', 'me':
print(s, shut_down(s))

c:\Users\Mark\MyPython>b.py
what Sorry, I didn't understand you
the Sorry, I didn't understand you
heck? Sorry, I didn't understand you
YES Shutting down...
NO Shutdown aborted!
works Sorry, I didn't understand you
okay Sorry, I didn't understand you
for Sorry, I didn't understand you
me Sorry, I didn't understand you


--
If you're using GoogleCrap™ please read this 
http://wiki.python.org/moin/GoogleGroupsPython.


Mark Lawrence

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] why does this not work

2013-04-23 Thread Karan Goel
You're missing a dot (.)

*Sorry, I didn't understand you.*

- Karan Goel



The Real Reason Things Keep Going Wrong:

At the beginning of time, God set a Magic Top Spinning... and spinning...
and spinning... and spinning... and spinning... and spinning... and
spinning...

After a few hundred million years God got bored and gave the top a good
kick; so it went rebounding away, flinging off planets and stars and
dinosaurs, and later, people who wrote about dinosaurs.

Then God realized that although Order and Regularity are virtuous, if you
want interesting stories, now and then you have to give things a good Kick!

This explains a lot.


On Tue, Apr 23, 2013 at 12: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
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] why does this not work

2013-04-23 Thread Roelof Wobben
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___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor