Re: While loop help

2013-04-10 Thread Larry Hudson
On 04/09/2013 11:44 PM, Larry Hudson wrote: On 04/09/2013 09:49 AM, thomasancill...@gmail.com wrote: So what would be the proper way to perform a loop of this program. I still can't quite figure out the best way to do it. My suggestion... (pseudocode) # Print a heading/introduction here w

Re: While loop help

2013-04-10 Thread rusi
On Apr 9, 8:47 pm, thomasancill...@gmail.com wrote: > ... and if you have any ideas for me to improve my coding that will prevent > me from learning > python in a sloppy way. I'd like to learn it correctly the first time! Not perhaps a direct answer... Anyways there is style in which python is b

Re: While loop help

2013-04-09 Thread Larry Hudson
On 04/09/2013 09:49 AM, thomasancill...@gmail.com wrote: So what would be the proper way to perform a loop of this program. I still can't quite figure out the best way to do it. My suggestion... (pseudocode) # Print a heading/introduction here while True: # Print menu, with an added

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 6:59 AM, Walter Hurry wrote: > On Tue, 09 Apr 2013 16:12:34 -0400, Dave Angel wrote: > >> On 04/09/2013 03:35 PM, Walter Hurry wrote: >>> On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: >>> On Wed, Apr 10, 2013 at 1:47 AM, wrote: > ... I'm not sure what

Re: While loop help

2013-04-09 Thread Walter Hurry
On Tue, 09 Apr 2013 16:12:34 -0400, Dave Angel wrote: > On 04/09/2013 03:35 PM, Walter Hurry wrote: >> On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: >> >>> On Wed, Apr 10, 2013 at 1:47 AM, wrote: ... I'm not sure what version I'm using ... >>> >>> Try putting these lines into a

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 03:35 PM, Walter Hurry wrote: On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: On Wed, Apr 10, 2013 at 1:47 AM, wrote: ... I'm not sure what version I'm using ... Try putting these lines into a Python script: import sys print(sys.version) That works (of course), b

Re: While loop help

2013-04-09 Thread Walter Hurry
On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: > On Wed, Apr 10, 2013 at 1:47 AM, wrote: >> ... I'm not sure what version I'm using ... > > Try putting these lines into a Python script: > > import sys > print(sys.version) > That works (of course), but in every Python version I've s

Re: While loop help

2013-04-09 Thread jmfauth
On 9 avr, 15:32, thomasancill...@gmail.com wrote: > I'm new to learning python and creating a basic program to convert units of > measurement which I will eventually expand upon but im trying to figure out > how to loop the entire program. When I insert a while loop it only loops the > first 2 l

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 01:18 PM, thomasancill...@gmail.com wrote: sorry i just started using google groups, not really all that sure how to use it properly. IMHO, best way is to switch to a good email program, and mail your messages to comp.lang.python. That's after subscribing via http://mail.

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 12:57 PM, thomasancill...@gmail.com wrote: I responded before I saw this message, this was very helpful so I appreciate your quick and helpful responses. So do you think prompting for a string and then checking if the string is true is a good practice for something like this? Whe

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 3:18 AM, wrote: > sorry i just started using google groups, not really all that sure how to use > it properly. The best way to use Google Groups is to not use it, frankly. Just subscribe to the mailing list in gmail; it has its own issues (eg it encourages top-posting by

Re: While loop help

2013-04-09 Thread thomasancilleri
sorry i just started using google groups, not really all that sure how to use it properly. -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread Dave Angel
On 04/09/2013 09:57 AM, thomasancill...@gmail.com wrote: On Tuesday, April 9, 2013 9:32:18 AM UTC-4, thomasa...@gmail.com wrote: I'm new to learning python and creating a basic program to convert units of measurement which I will eventually expand upon but im trying to figure out how to loop t

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 2:57 AM, wrote: > I responded before I saw this message, this was very helpful so I appreciate > your quick and helpful responses. So do you think prompting for a string and > then checking if the string is true is a good practice for something like > this? When would c

Re: While loop help

2013-04-09 Thread thomasancilleri
I responded before I saw this message, this was very helpful so I appreciate your quick and helpful responses. So do you think prompting for a string and then checking if the string is true is a good practice for something like this? When would checking for true/false be necessary? -- http://ma

Re: While loop help

2013-04-09 Thread thomasancilleri
So what would be the proper way to perform a loop of this program. I still can't quite figure out the best way to do it. -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 2:24 AM, wrote: > For system version I get this: > 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] Lovely! Perfect. > But, what I don't understand exactly is the while statement. I've been > looking around a lo

Re: While loop help

2013-04-09 Thread Joel Goldstick
On Tue, Apr 9, 2013 at 12:24 PM, wrote: > For system version I get this: > 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] > > Also, I understand what your saying about the continuation code. There's > no need for me to include it in eac

Re: While loop help

2013-04-09 Thread thomasancilleri
For system version I get this: 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] Also, I understand what your saying about the continuation code. There's no need for me to include it in each if/else statement, I could just use it at the en

Re: While loop help

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 1:47 AM, wrote: > ... I'm not sure what version I'm using ... Try putting these lines into a Python script: import sys print(sys.version) That, on any version of Python (back a fairly long way, Steven D'Aprano can probably say how far), will give you a line or so of out

Re: While loop help

2013-04-09 Thread Joel Goldstick
On Tue, Apr 9, 2013 at 11:47 AM, wrote: > Sorry I'm just starting to learn python and I'm not sure what version I'm > using to be quite honest. I just started typing it up in Komodo edit (Which > I'm not personally a fan in particular) I fixed the missing parenthesis > which fixed the invalid syn

Re: While loop help

2013-04-09 Thread thomasancilleri
Sorry I'm just starting to learn python and I'm not sure what version I'm using to be quite honest. I just started typing it up in Komodo edit (Which I'm not personally a fan in particular) I fixed the missing parenthesis which fixed the invalid syntax problem. Also, I apologize for submitting c

Re: While loop help

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 11:58 PM, wrote: > Also I'm getting a invalid syntax next to my elif statements that i wasnt > getting before. why is this happening now? Ah! That's relating to the close parenthesis problem I mentioned. That's the exact issue I saw. When you get told about a problem, so

Re: While loop help

2013-04-09 Thread Chris Angelico
On Tue, Apr 9, 2013 at 11:32 PM, wrote: > I'm new to learning python and creating a basic program to convert units of > measurement which I will eventually expand upon but im trying to figure out > how to loop the entire program. When I insert a while loop it only loops the > first 2 lines. Ca

Re: While loop help

2013-04-09 Thread thomasancilleri
Also I'm getting a invalid syntax next to my elif statements that i wasnt getting before. why is this happening now? -- http://mail.python.org/mailman/listinfo/python-list

Re: While loop help

2013-04-09 Thread thomasancilleri
On Tuesday, April 9, 2013 9:32:18 AM UTC-4, thomasa...@gmail.com wrote: > I'm new to learning python and creating a basic program to convert units of > measurement which I will eventually expand upon but im trying to figure out > how to loop the entire program. When I insert a while loop it only

While loop help

2013-04-09 Thread thomasancilleri
I'm new to learning python and creating a basic program to convert units of measurement which I will eventually expand upon but im trying to figure out how to loop the entire program. When I insert a while loop it only loops the first 2 lines. Can someone provide a detailed beginner friendly exp