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


Groups > comp.lang.python > #33579

Re: Problems on these two questions

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!feed.xsnews.nl!border-1.ams.xsnews.nl!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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 OK 0.020
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; '"""': 0.05; 'assign': 0.07; 'subject:two': 0.07; 'python': 0.09; 'any.': 0.09; 'cc:addr :python-list': 0.10; 'itself.': 0.11; 'describing': 0.16; 'subject:Problems': 0.16; 'subject:questions': 0.16; 'subject:these': 0.16; 'wrote:': 0.17; 'integer': 0.17; 'cc:2**0': 0.23; 'statement': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'factor': 0.29; 'problem': 0.33; 'version': 0.34; 'nov': 0.35; 'returning': 0.35; 'pm,': 0.35; "didn't": 0.36; 'should': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'positive': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; "you've": 0.61; 'show': 0.63; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'received:74.208.4.194': 0.84; 'dennis': 0.91; 'angel': 0.93; 'factors': 0.95
Date Mon, 19 Nov 2012 20:52:13 -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 Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Problems on these two questions
References <400c615f-4d93-4b8b-85ec-1bb4c47e30fe@googlegroups.com> <50A996EB.2000600@davea.name> <cdfla8ts287v7rdu4eo4n02imiqvacgp3t@invalid.netcom.com>
In-Reply-To <cdfla8ts287v7rdu4eo4n02imiqvacgp3t@invalid.netcom.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:xD1kW/Nk0X3jX3BK/R1lIEva9X6731jpzH+fgybJ1y4 lBMitISytBOiPvV4b/o7jfzpv8qpax7VSKYH/oDW+oioRUWH2N zt1j3VdqAtVZfstg7GF6nm19NKQddrXYznafI64PVFQmHkjsTD Qt1n3g7wknKoZ6/lrfjHl9uwyT87TA0xLZ+h1fkQACLCHSssgo rtOCATsgq6ZWun/r87iw8WCGywb2hNIfOrc71pfsqSsmegUFEi f42MtCLQ01omRcDq21YjOFstSdzorPoUyfOusyTDANv5sKytgC byNqm+COwtqOYS+hyPIhC1oShAHjruuNevg0Dufu35lthPLSg= =
Cc python-list@python.org
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.27.1353376363.29569.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353376363 news.xs4all.nl 6952 [2001:888:2000:d::a6]:37184
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33579

Show key headers only | View raw


On 11/19/2012 06:16 PM, Dennis Lee Bieber wrote:
> On Sun, 18 Nov 2012 21:18:19 -0500, Dave Angel <d@davea.name> declaimed
> the following in gmane.comp.python.general:
>
>
>> if is_a_prime(n):
>>     is_prime = True
>>
>> Now all you have to do is write is_a_prime().  if you get stuck, please
>> show us what you've got, and what the problem is with it.  And as usual,
>> tell us what version of Python you're writing in, if any.
>>
> 	Since "is_a_prime" is returning a Boolean, this condenses to:
>
> 	is_prime = is_a_prime(n)

Nope, the original problem statement didn't say what should should
happen if n does have such factors.  Clearly, it's only describing a
program fragment.

"""1.Given a positive integer  n , assign True to  is_prime if  n has no factors other than  1 and itself. (Remember,  m is a factor of  n if  m divides  n evenly.) 

"""

-- 

DaveA

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


Thread

Problems on these two questions su29090 <129km09@gmail.com> - 2012-11-18 17:52 -0800
  Re: Problems on these two questions Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-19 02:09 +0000
  Re: Problems on these two questions su29090 <129km09@gmail.com> - 2012-11-18 18:15 -0800
    Re: Problems on these two questions Dave Angel <d@davea.name> - 2012-11-18 21:33 -0500
  Re: Problems on these two questions Dave Angel <d@davea.name> - 2012-11-18 21:18 -0500
  Re: Problems on these two questions Chris Angelico <rosuav@gmail.com> - 2012-11-19 13:23 +1100
  Re: Problems on these two questions Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-19 18:15 -0500
    Re: Problems on these two questions Neil Cerutti <neilc@norwich.edu> - 2012-11-20 15:02 +0000
  Re: Problems on these two questions Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-19 18:16 -0500
  Re: Problems on these two questions Dave Angel <d@davea.name> - 2012-11-19 20:52 -0500
  Re: Problems on these two questions Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-19 23:32 -0700

csiph-web