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


Groups > comp.lang.python > #33527

Re: Problems on these two questions

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'mathematics': 0.04; 'assign': 0.07; 'subject:two': 0.07; 'challenges.': 0.09; 'successive': 0.09; 'url:faqs': 0.09; 'itself.': 0.11; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'progression': 0.16; 'subject:Problems': 0.16; 'subject:questions': 0.16; 'subject:these': 0.16; 'url:catb': 0.16; 'well-known': 0.16; 'with?': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'integer': 0.17; '(or': 0.18; 'code.': 0.20; 'sort': 0.21; 'received:209.85.214.174': 0.21; 'sorry,': 0.22; 'programming': 0.23; 'header:In-Reply-To:1': 0.25; 'question': 0.27; 'message- id:@mail.gmail.com': 0.27; 'trouble': 0.28; 'post': 0.28; 'arithmetic': 0.29; 'factor': 0.29; 'code': 0.31; "aren't": 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'nov': 0.35; 'problem,': 0.35; 'same.': 0.35; 'sequence': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; '12,': 0.36; 'useful': 0.36; 'problems': 0.36; 'two': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'behind': 0.38; 'positive': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'your': 0.60; 'skip:u 10': 0.60; "you'll": 0.62; 'distance': 0.62; 'between': 0.63; 'information': 0.63; '2.an': 0.84; 'factors': 0.95
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:to :content-type:content-transfer-encoding; bh=iJ/Pz0NafZfnDec789daiuJxqsjY5tzRLIiV83SEYpY=; b=OxyY6+TdnwWn0seBaLEGPIOQ6vRbo1rOEaRsWcAii/4GH2HJxcElORF2P030KOMQcx 8IiW5vNlWNnpBpfJBEEJI7NZH6YIjBLsRFmpJoosCsIvhHTvIXa8XBGT9q4KmeBvEtfM x4HQeotVAYqHBVqTehsnNHEGCsQ+MQArvA639sxdPVXWibJLN/NnyeWKVXNIoXw4JL0Q fEU5XL2gEa4mL+PD8A39bM4vc8S988ryS/yITz5fh/NvlABkE+08jsfTBJyFPHg6Jko2 d4SJlINy6jU8EU+EuFxDhei3V+V+4NZPTOHe7gaN7MyhhQ7OexUb5miTkQSk0Gb8hcPN 3oCQ==
MIME-Version 1.0
In-Reply-To <400c615f-4d93-4b8b-85ec-1bb4c47e30fe@googlegroups.com>
References <400c615f-4d93-4b8b-85ec-1bb4c47e30fe@googlegroups.com>
Date Mon, 19 Nov 2012 13:23:37 +1100
Subject Re: Problems on these two questions
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
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 <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.3805.1353291819.27098.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353291819 news.xs4all.nl 6870 [2001:888:2000:d::a6]:46058
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33527

Show key headers only | View raw


On Mon, Nov 19, 2012 at 12:52 PM, su29090 <129km09@gmail.com> wrote:
> 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.)
>
> 2.An  arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same. This in the sequence  1, 3, 5, 7, ... , the distance is 2 while in the sequence  6, 12, 18, 24, ... , the distance is 6.

Each of these problems is in two halves:

a) Understanding the mathematics behind the question
b) Writing the code.

Which half are you halfing (oops sorry, *having*) trouble with? If
(a), this isn't a programming question at all - search the web for
information on the problem, as these are well-known challenges. If
(b), you'll need to post your code to get any sort of useful help - we
aren't mindreaders, though we do try to look that way sometimes!

Either way, check this out:
http://www.catb.org/esr/faqs/smart-questions.html#homework

ChrisA

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