While loop help
Dave Angel
davea at davea.name
Tue Apr 9 13:12:43 EDT 2013
On 04/09/2013 09:57 AM, thomasancilleri at gmail.com wrote:
> On Tuesday, April 9, 2013 9:32:18 AM UTC-4, thomasa... at 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 lines. Can someone provide a detailed beginner friendly explanation. Here is my program. Also suddenly I'm getting an invalid syntax error next to my elif statements when I wasn't a minute ago. What is wrong here?
>>
>>
>>
>> #!/usr/bin/env python
>>
>> restart = "true"
>>
>> while restart == "true":
>>
>> #Program starts here
>>
>> print "To start the Unit Converter please type the number next to the conversion you would like to perform"
>>
>> choice = input("\n1:Inches to Meter\n2:Millileters to Pint\n3:Acres to Square-Miles\n")
>>
Quoting that many lines, and double-spacing every one of them is very
impolite. Almost makes me want to skip the thread.
If you must use buggy googlegroups, then at least fix its most annoying
bugs:
read this http://wiki.python.org/moin/GoogleGroupsPython.
(rest deleted, as the point has been made)
--
DaveA
More information about the Python-list
mailing list