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


Groups > comp.lang.python > #33521

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!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.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'assign': 0.07; 'subject:two': 0.07; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'successive': 0.09; 'itself.': 0.11; 'language': 0.14; 'advance.': 0.15; '24,': 0.16; 'progression': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:Problems': 0.16; 'subject:questions': 0.16; 'subject:these': 0.16; 'using,': 0.16; 'wrote:': 0.17; 'integer': 0.17; 'specify': 0.17; '(or': 0.18; 'variable': 0.20; 'programming': 0.23; 'elements': 0.23; 'tried': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.28; 'arithmetic': 0.29; 'factor': 0.29; 'far,': 0.29; 'version,': 0.30; 'code': 0.31; 'from:addr:yahoo.co.uk': 0.32; 'to:addr:python-list': 0.33; 'another': 0.33; 'thanks': 0.34; 'same.': 0.35; 'sequence': 0.35; 'list.': 0.35; 'received:org': 0.36; 'but': 0.36; '12,': 0.36; 'problems': 0.36; 'two': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'positive': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; "you've": 0.61; 'distance': 0.62; 'between': 0.63; 'sum': 0.66; '2.an': 0.84; 'factors': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Problems on these two questions
Date Mon, 19 Nov 2012 02:09:48 +0000
References <400c615f-4d93-4b8b-85ec-1bb4c47e30fe@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host host-78-147-186-199.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.0; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
In-Reply-To <400c615f-4d93-4b8b-85ec-1bb4c47e30fe@googlegroups.com>
X-Antivirus avast! (VPS 121118-1, 18/11/2012), Outbound message
X-Antivirus-Status Clean
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.3801.1353290894.27098.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353290894 news.xs4all.nl 6860 [2001:888:2000:d::a6]:34147
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33521

Show key headers only | View raw


On 19/11/2012 01:52, su29090 wrote:
>
> I all of the other problems but I have issues with these:
>
> 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.
>
>   Given the positive integer  distance and the positive integer  n , associate the variable  sum with the sum of the elements of the arithmetic progression from  1 to  n with distance  distance . For example, if  distance is 2 and  n is  10 , then  sum would be associated with  26 because  1+3+5+7+9 = 25 .
>
> Thanks in advance.
>

Please specify what programming language and OS you're using, what code 
you've tried so far, and what problems if any you're having.  If you're 
using Python please give us the version, if not please try another 
mailing list.

-- 
Cheers.

Mark Lawrence.

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