Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4a.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.127 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.75; '*S*': 0.00; 'subject:query': 0.07; 'linear': 0.09; 'rough': 0.16; 'wrote:': 0.18; 'slightly': 0.19; 'subject:Code': 0.24; 'question': 0.24; 'subject:/': 0.26; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; 'points': 0.29; "doesn't": 0.30; 'compared': 0.30; 'said,': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'calculated': 0.31; 'decimal': 0.31; 'noted': 0.31; 'problem.': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'to:addr:python- list': 0.38; 'that,': 0.38; 'realize': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'skip:u 10': 0.60; 'ian': 0.60; 'stated': 0.69; 'therefore': 0.72; 'cuts': 0.84; 'effectively,': 0.84; 'average': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=NVs/iwyKJ1c/7EO3K4ygSZCwNCJyW4xXyj/vxHOD9Ik=; b=c6cvxWf+azt2izQ40Pj7xdqXPnB7u7j+OYxoZy9yLRM4S+qUU14o1eui5BWdhfw6ue 74QcLkkKYhXJzNWSLe3H6ufHwPDAzRazFUvrhTPi/KvKHXFQJ824hbLmk5RTjsHP04US 1SlglRnAthKwF3VA+pNsfUJPxmTc3T1rroNLxHhVVWSUIp9czqRxZ8EfPF4QYOPND9+0 pyqyLdGVzj2J5QdHk4YwT4ZV2vHeS2Vy9KUsVAXLIFZB5XualPB+ER5AAshR/HJUaV2h 5sqSCpR3OMDzTC35ZmjmNiWpFjE0SxBEqMpCh2su4Vcr3uA882VAZYKa3v+U4upRnbBu 5E+g== X-Received: by 10.66.66.66 with SMTP id d2mr29754129pat.80.1396341022517; Tue, 01 Apr 2014 01:30:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <533a3fd8$0$2909$c3e8da3$76491128@news.astraweb.com> <533a6af1$0$2909$c3e8da3$76491128@news.astraweb.com> From: Ian Kelly Date: Tue, 1 Apr 2014 02:29:42 -0600 Subject: Re: Code style query: multiple assignments in if/elif tree To: Python Content-Type: text/plain; charset=ISO-8859-1 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396341026 news.xs4all.nl 2943 [2001:888:2000:d::a6]:42878 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69493 On Tue, Apr 1, 2014 at 1:59 AM, Ian Kelly wrote: > Given that, I have to question your figures: > >> 177.211111333333 > >> compared to 177.26527800000002 calculated the rough way. That's not bad, >> only about 5cm off! Effectively, your rough calculation was accurate to >> one decimal place. > > As I noted the rough way should be an underestimate, so I'm not sure > why it's an overestimate here. That said, I don't see where either of > us made a mistake. And I realize now that this is also because the linear deceleration assumption doesn't match the average deceleration stated in the problem. It actually decelerates faster and cuts under the t=1s and t=2s points in the velocity graph, and therefore is actually a slightly larger underestimate.