Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95805
| Path | csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.032 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'subject:python': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'looping': 0.16; 'storing': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'please?': 0.22; 'sep': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'question': 0.27; 'message- id:@mail.gmail.com': 0.27; '"do': 0.29; 'print': 0.30; 'anyone': 0.32; 'tue,': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'should': 0.36; 'subject:: ': 0.37; 'list.': 0.37; 'sum': 0.69; 'chrisa': 0.84; 'homework': 0.84; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=4iv1WlFEVspJMVFWl3d8xPbtc6SomC0hPD6ZPVaW4v4=; b=a5PAt96z6Eu/AFbn2aRnqAB8f2IRocumucwiVNC9Ep1E4Vuf7vgV6jMypaeq8+T46w m8o5ftDdJiPamzVzO0hHiezHTHAZ/t4b3SM9w0r5CNX/WCrw1gOkT0CHBkmdEg2AL7i2 /A2vHtUiRmWeL61C1zAMItsNmD3WSyu4MarpR25tAas63AJOaZIbtbHO78qtmOG865qt DEDi5UFYq/m7A1Lb+YpIr98cZLFyC94MV6FXLsEGA+nFzXOvRMiXH71bofD2C7YESFuB CG9toNgs/BsR0g87uWB8aK+sNyWB/8thAiaFhCFEwsyb/RObis9COndYwnJBexJYUakQ dL/A== |
| MIME-Version | 1.0 |
| X-Received | by 10.107.36.8 with SMTP id k8mr7225887iok.157.1441065714745; Mon, 31 Aug 2015 17:01:54 -0700 (PDT) |
| In-Reply-To | <2b0f07c4-cda8-4bf9-9ef3-b80cccec81a4@googlegroups.com> |
| References | <2b0f07c4-cda8-4bf9-9ef3-b80cccec81a4@googlegroups.com> |
| Date | Tue, 1 Sep 2015 10:01:54 +1000 |
| Subject | Re: Hi am new to python |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.25.1441065717.23514.python-list@python.org> (permalink) |
| Lines | 13 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1441065717 news.xs4all.nl 23739 [2001:888:2000:d::a6]:59596 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:95805 |
Show key headers only | View raw
On Tue, Sep 1, 2015 at 9:27 AM, Chubasco Diranga <alpharulz@gmail.com> wrote: > Can anyone please help me with the following please? > > My question is in a while loop; how do l sum all the numbers in the given list (list_a)? > > list_a = [8, 5, 2, 4] > sum_a = 0 # for storing the sum of list_a > i = 0 # for looping through the list_a# Use a while loop to sum all numbers in list_a# If you store the sums into sum_a > print(sum_a) # should print 19 This is not a "do my homework for me" list. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Hi am new to python Chubasco Diranga <alpharulz@gmail.com> - 2015-08-31 16:27 -0700 Re: Hi am new to python Ian Kelly <ian.g.kelly@gmail.com> - 2015-08-31 17:34 -0600 Re: Hi am new to python Emile van Sebille <emile@fenx.com> - 2015-08-31 16:36 -0700 Re: Hi am new to python Chris Angelico <rosuav@gmail.com> - 2015-09-01 10:01 +1000 Re: Hi am new to python Ben Finney <ben+python@benfinney.id.au> - 2015-09-01 10:22 +1000
csiph-web