Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43204

Re: While loop help

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; 'beginner': 0.05; 'elif': 0.05; 'insert': 0.05; 'lines,': 0.07; 'suddenly': 0.07; 'subject:help': 0.08; 'here?': 0.09; 'lines.': 0.09; 'restart': 0.09; 'statements': 0.09; 'python': 0.11; '"to': 0.16; '"true":': 0.16; '(rest': 0.16; 'buggy': 0.16; 'deleted,': 0.16; 'loops': 0.16; 'measurement': 0.16; 'received:74.208.4.195': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'trying': 0.19; 'starts': 0.20; 'print': 0.22; 'creating': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'skip': 0.24; 'url:moin': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; "i'm": 0.30; 'getting': 0.31; 'url:wiki': 0.31; 'figure': 0.32; 'url:python': 0.33; 'skip:# 10': 0.33; 'basic': 0.35; 'convert': 0.35; 'but': 0.35; 'next': 0.36; 'url:org': 0.36; 'unit': 0.37; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'eventually': 0.60; 'units': 0.60; 'most': 0.60; 'ago.': 0.61; 'conversion': 0.61; 'new': 0.61; 'entire': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'provide': 0.64; 'here': 0.66; 'invalid': 0.68; 'received:74.208': 0.68; 'friendly': 0.72; '2013': 0.98
Date Tue, 09 Apr 2013 13:12:43 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4
MIME-Version 1.0
To python-list@python.org
Subject Re: While loop help
References <b93147e7-9d17-4232-99a3-767b88f9e9ba@googlegroups.com> <cbd51f16-98d4-490e-92cf-7bbec3636401@googlegroups.com>
In-Reply-To <cbd51f16-98d4-490e-92cf-7bbec3636401@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:ISN8pO5TULKIQupNdflM44pCKVNPo1fOiMqwlugNT3y UFb24OlgGgcTH7oswoNOF30tNHWGBjUR+CNrXNeID5EjItdUMN UIQ7YawxxoGeILflgkElJr47M9riYAr9LQUbqGq1/BcgPXHDr4 N4GmXDzU66PiYmS/Nci7cl0y6c5OmqKNOUooP9c/DJch/LW3w1 b1GcnKX4djKibPwA90uslfl5pmBO2pOpNYZ9KzbQ9l2LIUjR0u h3YVKSADd1FB0yJ6ik1ywTt8dsZ1/366kkEofDqQqc7QKLhJvu zauriZuqO30XCPpqPFEllKTAihaKX5iQyc9IUOt3urywcHY4A= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.369.1365527582.3114.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1365527582 news.xs4all.nl 2586 [2001:888:2000:d::a6]:35185
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43204

Show key headers only | View raw


On 04/09/2013 09:57 AM, thomasancilleri@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 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

While loop help thomasancilleri@gmail.com - 2013-04-09 06:32 -0700
  Re: While loop help thomasancilleri@gmail.com - 2013-04-09 06:57 -0700
    Re: While loop help Dave Angel <davea@davea.name> - 2013-04-09 13:12 -0400
      Re: While loop help thomasancilleri@gmail.com - 2013-04-09 10:18 -0700
        Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 03:23 +1000
        Re: While loop help Dave Angel <davea@davea.name> - 2013-04-09 13:30 -0400
  Re: While loop help thomasancilleri@gmail.com - 2013-04-09 06:58 -0700
    Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 00:05 +1000
      Re: While loop help thomasancilleri@gmail.com - 2013-04-09 08:47 -0700
        Re: While loop help Joel Goldstick <joel.goldstick@gmail.com> - 2013-04-09 12:02 -0400
        Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 02:10 +1000
          Re: While loop help thomasancilleri@gmail.com - 2013-04-09 09:24 -0700
            Re: While loop help Joel Goldstick <joel.goldstick@gmail.com> - 2013-04-09 12:36 -0400
            Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 02:47 +1000
              Re: While loop help thomasancilleri@gmail.com - 2013-04-09 09:57 -0700
                Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 03:08 +1000
                Re: While loop help Dave Angel <davea@davea.name> - 2013-04-09 13:27 -0400
              Re: While loop help thomasancilleri@gmail.com - 2013-04-09 09:57 -0700
          Re: While loop help thomasancilleri@gmail.com - 2013-04-09 09:24 -0700
          Re: While loop help Walter Hurry <walterhurry@lavabit.com> - 2013-04-09 19:35 +0000
            Re: While loop help Dave Angel <davea@davea.name> - 2013-04-09 16:12 -0400
              Re: While loop help Walter Hurry <walterhurry@lavabit.com> - 2013-04-09 20:59 +0000
                Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 08:36 +1000
        Re: While loop help rusi <rustompmody@gmail.com> - 2013-04-10 08:59 -0700
      Re: While loop help thomasancilleri@gmail.com - 2013-04-09 08:47 -0700
  Re: While loop help Chris Angelico <rosuav@gmail.com> - 2013-04-10 00:00 +1000
  Re: While loop help thomasancilleri@gmail.com - 2013-04-09 09:49 -0700
    Re: While loop help Larry Hudson <orgnut@yahoo.com> - 2013-04-09 23:44 -0700
      Re: While loop help Larry Hudson <orgnut@yahoo.com> - 2013-04-10 20:00 -0700
  Re: While loop help jmfauth <wxjmfauth@gmail.com> - 2013-04-09 12:19 -0700

csiph-web