Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35937
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.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 | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | UNSURE 0.256 |
| X-Spam-Level | ** |
| X-Spam-Evidence | '*H*': 0.52; '*S*': 0.03; 'zero.': 0.09; 'wed,': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'jan': 0.18; 'seems': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'easiest': 0.27; 'chris': 0.28; 'worked': 0.30; '(and': 0.32; 'adjust': 0.33; 'hotels': 0.33; 'to:addr:python-list': 0.33; 'pm,': 0.35; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'side': 0.61; 'subject:...': 0.63; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; '2013': 0.84; 'actually,': 0.84; 'divide': 0.84; 'received:74.208.4.194': 0.84; 'rooms': 0.84 |
| Date | Tue, 01 Jan 2013 17:34:26 -0500 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Considering taking a hammer to the computer... |
| References | <2f5053ab-a646-49d3-a569-61468f518b9f@googlegroups.com> <39abb4d2-277a-4ac9-8574-0d3e3751b7ef@googlegroups.com> <CAPTjJmqqGB1RiRipFY6eJmKvzeAaONWfsA0qB0bYMasR=sUtxA@mail.gmail.com> |
| In-Reply-To | <CAPTjJmqqGB1RiRipFY6eJmKvzeAaONWfsA0qB0bYMasR=sUtxA@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:VuOTE3KKU3RAgHjxom8lPfEjfo/KkXw6zrB3mF2Nbey EW/ZuJtVWKaEx7YtsQfy9sz5icPaB1IDMF/X0WDSDW8QgHTxy9 ip/FDfMgv97yTidkH5/fk7kObIKIiATPoFLdKCB93N7RMlzvFW BUckDmpegpTJRvG4hA4zSVeRBcyU6sppa9X3bcYMhvMiJkWX5P NtoCB9UyG6KRJPGkRWWNvCmHZzH2fcfYcN3dqepFLGnNEXEbnF vleeYUj3ASp4gHjTAdVNKC8S5vHVMIacXPvRqRJ1jP/MK575lk 2XPsJaZ4g/moP+rF8UQD2znUu5lUZk4N3QJKr3044flHMDmzg= = |
| X-Mailman-Approved-At | Wed, 02 Jan 2013 01:05:11 +0100 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| 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.1541.1357085113.29569.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357085113 news.xs4all.nl 6873 [2001:888:2000:d::a6]:56462 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:35937 |
Show key headers only | View raw
On 01/01/2013 05:01 PM, Chris Angelico wrote: > On Wed, Jan 2, 2013 at 7:14 AM, <worldsbiggestsabresfan@gmail.com> wrote: >> floor_number = 0 >> for i in range(number_of_floors): >> floor_number = floor_number + 1 > Matt's already given you the part you need (and it seems to have > worked for you, yay!). Side point: Are you aware that i and > floor_number are always going to have the same value? You can simplify > this down to: > > for floor_number in range(number_of_floors): > > ChrisA Actually, floor_number is one higher. The easiest way to fix that is to adjust the range() parms. for floor_number in range(1, 1+number_of_floors): Naturally, in some hotels that might not have any rooms on one of the floors. Divide by zero. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Considering taking a hammer to the computer... worldsbiggestsabresfan@gmail.com - 2012-12-31 15:42 -0800
Re: Considering taking a hammer to the computer... Chris Angelico <rosuav@gmail.com> - 2013-01-01 11:08 +1100
Re: Considering taking a hammer to the computer... Chris Angelico <rosuav@gmail.com> - 2013-01-01 11:09 +1100
Re: Considering taking a hammer to the computer... Mitya Sirenef <msirenef@lightbird.net> - 2012-12-31 19:29 -0500
Re: Considering taking a hammer to the computer... Mitya Sirenef <msirenef@lightbird.net> - 2012-12-31 19:34 -0500
Re: Considering taking a hammer to the computer... Vlastimil Brom <vlastimil.brom@gmail.com> - 2013-01-01 01:36 +0100
Re: Considering taking a hammer to the computer... worldsbiggestsabresfan@gmail.com - 2012-12-31 17:30 -0800
Re: Considering taking a hammer to the computer... Mitya Sirenef <msirenef@lightbird.net> - 2012-12-31 21:00 -0500
Re: Considering taking a hammer to the computer... Tim Chase <python.list@tim.thechases.com> - 2012-12-31 22:41 -0600
Re: Considering taking a hammer to the computer... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-01 14:35 -0500
Re: Considering taking a hammer to the computer... Modulok <modulok@gmail.com> - 2012-12-31 20:59 -0700
Re: Considering taking a hammer to the computer... worldsbiggestsabresfan@gmail.com - 2013-01-01 12:14 -0800
Re: Considering taking a hammer to the computer... Matt Jones <matt.walker.jones@gmail.com> - 2013-01-01 14:46 -0600
Re: Considering taking a hammer to the computer... worldsbiggestsabresfan@gmail.com - 2013-01-01 13:57 -0800
Re: Considering taking a hammer to the computer... worldsbiggestsabresfan@gmail.com - 2013-01-01 13:57 -0800
Re: Considering taking a hammer to the computer... Chris Angelico <rosuav@gmail.com> - 2013-01-02 09:01 +1100
Re: Considering taking a hammer to the computer... Dave Angel <d@davea.name> - 2013-01-01 15:28 -0500
Re: Considering taking a hammer to the computer... Dave Angel <d@davea.name> - 2013-01-01 17:34 -0500
Re: Considering taking a hammer to the computer... MRAB <python@mrabarnett.plus.com> - 2013-01-01 00:02 +0000
csiph-web