Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'continuation': 0.07; 'lately': 0.07; 'subject:help': 0.08; 'integers': 0.09; 'matched': 0.09; 'restart': 0.09; 'statements': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2.7.2': 0.16; 'brackets.': 0.16; 'indent': 0.16; 'instance:': 0.16; 'statement.': 0.16; 'true:': 0.16; 'code.': 0.18; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'java': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'this:': 0.26; 'header:In- Reply-To:1': 0.27; "doesn't": 0.30; 'matching': 0.30; 'statement': 0.30; 'skip:( 20': 0.30; "i'm": 0.30; 'code': 0.31; '4.0': 0.31; 'compatible': 0.32; 'run': 0.32; 'could': 0.34; 'message.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'c++': 0.36; 'false': 0.36; 'doing': 0.36; 'method': 0.36; 'apple': 0.38; 'how': 0.40; 'from:no real name:2**0': 0.61; 'matter': 0.61; 'statement,': 0.68; '4.2.1': 0.84; 'imagine': 0.93 X-Received: by 10.182.104.228 with SMTP id gh4mr205785obb.27.1365524655230; Tue, 09 Apr 2013 09:24:15 -0700 (PDT) Newsgroups: comp.lang.python Date: Tue, 9 Apr 2013 09:24:15 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.194.186.13; posting-account=iVEBawoAAADC2zcRyETBjispujvlKyYR References: <596ca4b8-b5aa-4112-b086-6320108075f7@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 68.194.186.13 MIME-Version: 1.0 Subject: Re: While loop help From: thomasancilleri@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: , Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365524664 news.xs4all.nl 2706 [2001:888:2000:d::a6]:53406 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43196 For system version I get this: 2.7.2 (default, Oct 11 2012, 20:14:37)=20 [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 a= t the end of the program outside of the statements and it would run no matt= er what. But, what I don't understand exactly is the while statement. I've = been looking around a lot lately and notice that people say to use for inst= ance: while restart: or while true: or while restart =3D true: What makes a statement true? Is there a way to return a true or false messa= ge. My method was to ask the user to type "true" and if that print statemen= t matched restart =3D "true" then the loop would continue but i imagine the= re is a better way then matching strings and integers like i have been. Also what confuses me is that python doesn't use brackets. How do I contain= all of my if/else statements into one while loop? Do I have to indent each= line of code and extra indentation? I'm used to highschool doing c++ and j= ava when I would just say: while (x<3)=20 { if () else () }