Re: [Tutor] Python backwards program (fwd)

2005-04-15 Thread Danny Yoo
[Jim, when you reply, please send to [EMAIL PROTECTED] Don't just send your reply only to me. Use your email client's Reply-To-All feature.] [Jim] > > The following gives me the last letter of the string. > > > > backwords=raw_input("enter number or string:") > > print backwords[-1]

Re: [Tutor] Python backwards program (fwd)

2005-04-14 Thread Jim and Laura Ahl
April 14, 2005 1:52 PM Subject: Re: [Tutor] Python backwards program (fwd) > Does the 2.2 python have the ability to do this?Hi Jim,Python 2.2 is actually a bit old; you may want to update the version ofPython on your system to Python 2.4.  You can find it here:    http://www.py

Re: [Tutor] Python backwards program (fwd)

2005-04-14 Thread Danny Yoo
> Does the 2.2 python have the ability to do this? Hi Jim, Python 2.2 is actually a bit old; you may want to update the version of Python on your system to Python 2.4. You can find it here: http://www.python.org/2.4/ A lot of the approaches you were trying earlier used features that were

Re: [Tutor] Python backwards program (fwd)

2005-04-14 Thread Brian van den Broek
-- Forwarded message -- Date: Thu, 14 Apr 2005 00:41:40 -0500 From: Jim and Laura Ahl <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python backwards program I thought you were on me a bit but I am so frustrated at this point. My instruct

Re: [Tutor] Python backwards program (fwd)

2005-04-14 Thread Danny Yoo
-- Forwarded message -- Date: Thu, 14 Apr 2005 00:41:40 -0500 From: Jim and Laura Ahl <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python backwards program I thought you were on me a bit but I am so frustrated at this point. My inst

Re: [Tutor] Python backwards program

2005-04-13 Thread Danny Yoo
> We're not going to do your homework problems; please understand that we > actually don't care if you get your homework done. And I really hope that > people don't just start blurting stuff at Jim for the other three homework > problems he's dumping on us. Hi Jim, Ok, I screwed up big time to

RE: [Tutor] Python backwards program

2005-04-13 Thread Tony Meyer
> In the print word [::-1] line it gives me this message > (sequence index must be an integer) What does that mean As others have said, it means you're using Python 2.2 or older (so can't use extended slicing). It seems likely that what you're after is the loop approach that has been mentioned b

Re: [Tutor] Python backwards program

2005-04-13 Thread Danny Yoo
> I have wrote 3 other programs in the class. Hi Jim, [cut] Ok, that's where I have to stop you for a moment. We're not going to do your homework problems; please understand that we actually don't care if you get your homework done. And I really hope that people don't just start blurting stu

Re: [Tutor] Python backwards program (fwd)

2005-04-13 Thread Danny Yoo
> I cannot write a program that gives me a double letter. > I can get each letter separate or pieces or parts of the word Hi Jim, [Please don't reply just to me: use the Reply-to-All feature on your email program. This allows your reply to be seen by the rest of us here. I want to make sure yo

Re: [Tutor] Python backwards program (fwd)

2005-04-13 Thread Danny Yoo
-- Forwarded message -- Date: Wed, 13 Apr 2005 09:01:16 -0500 From: Jim and Laura Ahl <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python backwards program (fwd) Danny I cannot write a program that gives me a double letter. I can get

Re: [Tutor] Python backwards program

2005-04-13 Thread Kent Johnson
Jim and Laura Ahl wrote: Thanks for the encouragement, here is what I have so far. word=raw_input("Enter a Word or string:") print word print word[::-1] raw_input("\n\nPress the enter key to exit.") In the print word [::-1] line it gives me this message (sequence index must be an integer) Wha

Re: [Tutor] Python backwards program

2005-04-13 Thread Jim and Laura Ahl
cookie program that randomly gives one fortune out of 5 to the user.   Jim - Original Message - From: Feziwe Mpondo To: Alberto Troiano Cc: [EMAIL PROTECTED] ; tutor@python.org Sent: Wednesday, April 13, 2005 10:14 AM Subject: Re: [Tutor] Python backwards progr

Re: [Tutor] Python backwards program

2005-04-13 Thread Alberto Troiano
in a little more specific (that's only applied to me :)) Regards Alberto  Gaucho>From: Feziwe Mpondo <[EMAIL PROTECTED]> >To: Alberto Troiano <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED], tutor@python.org >Subject: Re: [Tutor] Python backwards program >Date: Wed, 13 Apr

Re: [Tutor] Python backwards program

2005-04-13 Thread Feziwe Mpondo
t; backword="" >>> counter=len(word) >>> while counter!=0: backword+=word[counter-1] counter-=1 >>> print backword tseroF irikoK So choose the one you want and feel free to ask in case of any doubt Regards Alberto Gaucho >From: &qu

RE: [Tutor] Python backwards program

2005-04-13 Thread Alberto Troiano
> counter=len(word) >>> while counter!=0: backword+=word[counter-1] counter-=1 >>> print backwordtseroF irikoK So choose the one you want and feel free to ask in case of any doubt Regards Alberto  Gaucho>From: "Jim and Laura Ahl" <[EMAIL

RE: [Tutor] Python backwards program (fwd)

2005-04-12 Thread Tony Meyer
> We will not do your homework for you [snip] The slicing answer I posted is possibly the answer, but I assume that the loop solution, which I didn't post (in Python), is what is actually required. If slicing is what is wanted, then I apologise for giving an answer! :) =Tony.Meyer _

RE: [Tutor] Python backwards program (fwd)

2005-04-12 Thread Tony Meyer
> I have read about loops, strings, tuples. I am taking this > class on distance education and I am lost with this > assignment. I have read what Tony has wrote and that does me > no good. I do not understand what he is talking about. Which bits? The whole lot? I teach university students

Re: [Tutor] Python backwards program (fwd)

2005-04-12 Thread Lee Cullens
: Jim and Laura Ahl <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python backwards program I have read about loops, strings, tuples. I am taking this class on distance education and I am lost with this assignment. I have read what Tony has wrote and tha

Re: [Tutor] Python backwards program (fwd)

2005-04-12 Thread Danny Yoo
Hello Jim, > I have read about loops, strings, tuples. Can you show us an example of a loop? Can you show us the last program that you've written? It sounds like you've done a lot of reading. The problem with learning how to program is that you can't just read it: you actually have to write

Re: [Tutor] Python backwards program (fwd)

2005-04-12 Thread Danny Yoo
-- Forwarded message -- Date: Tue, 12 Apr 2005 22:37:44 -0500 From: Jim and Laura Ahl <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python backwards program I have read about loops, strings, tuples. I am taking this class on distance e

RE: [Tutor] Python backwards program

2005-04-12 Thread Danny Yoo
On Wed, 13 Apr 2005, Tony Meyer wrote: > > I am very new to programming and I have an assignment to have a > > raw_input string that is inputted by the user and then is printed > > backwards. Can anyone help me? I can get it to print regular but > > backwards in not working. > > I guess that I

RE: [Tutor] Python backwards program

2005-04-12 Thread Tony Meyer
> I am very new to programming and I have an assignment > to have a raw_input string that is inputted by the user > and then is printed backwards. Can anyone help me? I can > get it to print regular but backwards in not working. I guess that I shouldn't give code if this is for an assignment, bu

[Tutor] Python backwards program

2005-04-12 Thread Jim and Laura Ahl
I am very new to programming and I have an assignment to have a raw_input string that is inputted by the user and then is printed backwards.  Can anyone help me?  I can get it to print regular but backwards in not working.   Thank You Jim ___ Tutor