Re: Problems on these two questions

2012-11-20 Thread Neil Cerutti
On 2012-11-19, Dennis Lee Bieber wrote: > On Sun, 18 Nov 2012 17:52:35 -0800 (PST), su29090 > <129k...@gmail.com> declaimed the following in > gmane.comp.python.general: > >> >> I all of the other problems but I have issues with these: >> >> 1.Given a positive integer n , assign True to is_pri

Re: Problems on these two questions

2012-11-19 Thread Ian Kelly
On Mon, Nov 19, 2012 at 4:15 PM, Dennis Lee Bieber wrote: > On Sun, 18 Nov 2012 17:52:35 -0800 (PST), su29090 <129k...@gmail.com> > declaimed the following in gmane.comp.python.general: > >> >> I all of the other problems but I have issues with these: >> >> 1.Given a positive integer n , assign T

Re: Problems on these two questions

2012-11-19 Thread Dave Angel
On 11/19/2012 06:16 PM, Dennis Lee Bieber wrote: > On Sun, 18 Nov 2012 21:18:19 -0500, Dave Angel 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 yo

Re: Problems on these two questions

2012-11-18 Thread Dave Angel
On 11/18/2012 09:15 PM, su29090 wrote: > > I'm using Python 3.2 In Python 3.2, xrange has been renamed to range. So have you tried to solve problem #2 yet? -- DaveA -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems on these two questions

2012-11-18 Thread Chris Angelico
On Mon, Nov 19, 2012 at 12:52 PM, su29090 <129k...@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

Re: Problems on these two questions

2012-11-18 Thread su29090
On Sunday, November 18, 2012 8:52:35 PM UTC-5, su29090 wrote: > I did 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 > eve

Re: Problems on these two questions

2012-11-18 Thread Dave Angel
On 11/18/2012 08:52 PM, 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.) if is_a_prime(n): is_p

Re: Problems on these two questions

2012-11-18 Thread Mark Lawrence
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 se