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: 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 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: In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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