Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60049

Re: Newbie - Trying to Help a Friend

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.039
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'integers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Help': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; "d'aprano": 0.31; 'steven': 0.31; 'checking': 0.33; 'problem': 0.35; 'but': 0.35; "i'll": 0.36; 'positive': 0.37; 'two': 0.37; 'nov': 0.38; 'solving': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'numbers': 0.61; 'six': 0.68; 'hand.': 0.84; 'subject:Friend': 0.91; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re: Newbie - Trying to Help a Friend
Date Tue, 19 Nov 2013 22:10:55 -0500
References <0e127888-4bfa-4f14-aa55-df8ef53284a3@googlegroups.com> <528bff92$0$29992$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 174.32.174.29
In-Reply-To <528bff92$0$29992$c3e8da3$5496439d@news.astraweb.com>
User-Agent Groundhog Newsreader for Android
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.2950.1384917038.18130.python-list@python.org> (permalink)
Lines 39
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1384917038 news.xs4all.nl 15909 [2001:888:2000:d::a6]:49513
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60049

Show key headers only | View raw


On 20 Nov 2013 00:17:23 GMT, Steven D'Aprano 
<steve+comp.lang.python@pearwood.info> wrote:
> problem by hand. I'll get you started by solving the problem for 7.




> Positive integers less than 23 are 1, 2, 3, 4, 5, 6. So let's start 
> checking them for divisors:

Where did 23 come from?


> - 1 is not divisible by 2, 3 or 5, so we count one number.
> - 2 is divisible by 2, but not by 3 or 5, so we count two numbers.

2 doesn't count because it's divisible by 2. 

> - 3 is not divisible by 2, so we count three numbers.

3 doesn't count because it's divisible by 3

> - 4 is divisible by 2, but not 3 or 5, so we count four numbers

And so on.

> - 5 is not divisible by 2, so we count five numbers.
> - 6 is divisible by 2 and 3, but not by 5, so we count six numbers.


I count 1, not 6



> And the answer is: 6.

-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Newbie - Trying to Help a Friend bradleybooth12345@gmail.com - 2013-11-19 10:40 -0800
  Re: Newbie - Trying to Help a Friend maxwell34m@gmail.com - 2013-11-19 11:05 -0800
  Re: Newbie - Trying to Help a Friend Neil Cerutti <mr.cerutti@gmail.com> - 2013-11-19 14:07 -0500
  Re: Newbie - Trying to Help a Friend Gary Herron <gary.herron@islandtraining.com> - 2013-11-19 11:06 -0800
  Re: Newbie - Trying to Help a Friend bradleybooth12345@gmail.com - 2013-11-19 11:27 -0800
    Re: Newbie - Trying to Help a Friend Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-19 20:48 +0000
      Re: Newbie - Trying to Help a Friend Duncan Booth <duncan.booth@invalid.invalid> - 2013-11-20 11:38 +0000
        Re: Newbie - Trying to Help a Friend Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-23 02:03 +0000
    Re: Newbie - Trying to Help a Friend Mark Janssen <dreamingforward@gmail.com> - 2013-11-19 14:51 -0800
  Re: Newbie - Trying to Help a Friend Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-20 00:17 +0000
    Re: Newbie - Trying to Help a Friend Dave Angel <davea@davea.name> - 2013-11-19 22:10 -0500
      Re: Newbie - Trying to Help a Friend Steven D'Aprano <steve@pearwood.info> - 2013-11-20 03:52 +0000
        Re: Newbie - Trying to Help a Friend Dave Angel <davea@davea.name> - 2013-11-20 00:54 -0500
          Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 09:29 +0000
            Re: Newbie - Trying to Help a Friend Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-20 13:57 +0000
              Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 14:51 +0000
                Re: Newbie - Trying to Help a Friend Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-20 18:33 -0500
                Re: Newbie - Trying to Help a Friend Anssi Saari <as@sci.fi> - 2013-11-21 15:44 +0200
              Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 14:49 +0000
                Re: Newbie - Trying to Help a Friend Chris Angelico <rosuav@gmail.com> - 2013-11-21 02:05 +1100
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 15:06 +0000
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 15:09 +0000
                Re: Newbie - Trying to Help a Friend Chris Angelico <rosuav@gmail.com> - 2013-11-21 02:14 +1100
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 15:35 +0000
                Multiple postings Alister <alister.ware@ntlworld.com> - 2013-11-20 15:36 +0000
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 15:34 +0000
                Re: Newbie - Trying to Help a Friend Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-20 16:29 +0000
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 16:45 +0000
                Re: Newbie - Trying to Help a Friend Ned Batchelder <ned@nedbatchelder.com> - 2013-11-20 09:12 -0800
                Re: Newbie - Trying to Help a Friend Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-20 17:37 +0000
                Re: Newbie - Trying to Help a Friend Ned Batchelder <ned@nedbatchelder.com> - 2013-11-20 09:51 -0800
                Re: Newbie - Trying to Help a Friend Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-20 18:09 +0000
                Re: Newbie - Trying to Help a Friend Ned Batchelder <ned@nedbatchelder.com> - 2013-11-20 10:18 -0800
                Re: Newbie - Trying to Help a Friend Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-20 18:35 +0000
                Re: Newbie - Trying to Help a Friend Ned Batchelder <ned@nedbatchelder.com> - 2013-11-20 11:54 -0800
                Re: Newbie - Trying to Help a Friend Chris Angelico <rosuav@gmail.com> - 2013-11-21 07:26 +1100
                Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-21 00:27 +0000
                Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend] MRAB <python@mrabarnett.plus.com> - 2013-11-21 00:48 +0000
                Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend] Tim Golden <mail@timgolden.me.uk> - 2013-11-21 09:08 +0000
                Re: Off-topic: Pop culture references [was Re: Newbie - Trying to   Help a Friend] Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-11-22 17:10 +1300
                Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend] Chris Angelico <rosuav@gmail.com> - 2013-11-21 20:46 +1100
                Re: Newbie - Trying to Help a Friend Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-21 12:53 +0100
                Re: Newbie - Trying to Help a Friend Chris Angelico <rosuav@gmail.com> - 2013-11-22 02:48 +1100
                Re: Newbie - Trying to Help a Friend Neil Cerutti <mr.cerutti@gmail.com> - 2013-11-21 11:29 -0500
                Re: Newbie - Trying to Help a Friend Chris Angelico <rosuav@gmail.com> - 2013-11-22 04:10 +1100
                Re: Newbie - Trying to Help a Friend bradleybooth12345@gmail.com - 2013-11-21 15:17 -0800
                Re: Newbie - Trying to Help a Friend Gary Herron <gary.herron@islandtraining.com> - 2013-11-21 15:35 -0800
                Re: Newbie - Trying to Help a Friend bradleybooth12345@gmail.com - 2013-11-21 15:55 -0800
                Re: Newbie - Trying to Help a Friend Terry Reedy <tjreedy@udel.edu> - 2013-11-21 19:55 -0500
                Re: Newbie - Trying to Help a Friend Gary Herron <gary.herron@islandtraining.com> - 2013-11-21 20:17 -0800
                Re: Newbie - Trying to Help a Friend Terry Reedy <tjreedy@udel.edu> - 2013-11-21 19:17 -0500
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 15:34 +0000
                Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 15:06 +0000
                Re: Newbie - Trying to Help a Friend Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-20 15:24 +0000
              Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 14:50 +0000
              Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 14:50 +0000
          Re: Newbie - Trying to Help a Friend Alister <alister.ware@ntlworld.com> - 2013-11-20 09:29 +0000

csiph-web