Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; '21,': 0.07; 'result,': 0.07; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ivan': 0.16; 'subject:programming': 0.16; 'wrote:': 0.18; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; '15,': 0.26; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'message- id:@mail.gmail.com': 0.30; 'worked': 0.33; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'pm,': 0.38; 'is.': 0.60; 'most': 0.60; 'good!': 0.84; 'to:none': 0.92 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=8Wgqm4JNslwD0ZXfOWViM2saD+3CcE1skiJ16torOvQ=; b=JyhwfhJ4Nz0P5meZd5iIqaeAglH7I7Y27esge2fophr3LwA8DgeVjHqS49Cnzs7h+0 JWPC4/yz/PHjXER+cOelg4WVx6bcgYBJM+SuF0Hkg0R0oeTkYKrp3WHBvvUU1TZ3gc+d 9QKGvmN0D7jlHjrSYPfpbBRhE4UGutmETirnE0hLgXh60bWP7cFVe/Gj2tsvPlQ7vHlI U9LH/mq1zjkp+e+Wh9dZwwbW5K8q/RwHQqA6aIlnrRpXCXESbzgmQ7vyeu7IdvCw4jM1 QkLXkP0wTDkIZkOlgtuYuOwwl28SjPwKob/y4xiES8mNpSh/LN9ktfNWUt569mAB0R56 En9w== MIME-Version: 1.0 X-Received: by 10.220.147.16 with SMTP id j16mr31281477vcv.14.1398087830381; Mon, 21 Apr 2014 06:43:50 -0700 (PDT) In-Reply-To: <7f496a70-6b85-4bc9-bf33-7aeaad813d11@googlegroups.com> References: <7f496a70-6b85-4bc9-bf33-7aeaad813d11@googlegroups.com> Date: Mon, 21 Apr 2014 23:43:50 +1000 Subject: Re: symple programming task From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398088190 news.xs4all.nl 2917 [2001:888:2000:d::a6]:38328 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70462 On Mon, Apr 21, 2014 at 11:21 PM, Ivan Ivanivich wrote: > if "basis" is 15, then "mod" == 0 twice - when the "divider" is 3 and 15 Good! Yes, you worked out exactly what the problem is. :) There are ways to simplify your code, but it's now giving the correct result, so that's the most important thing. ChrisA