Re: Newbie - Trying to Help a Friend

2013-11-22 Thread Denis McMahon
On Wed, 20 Nov 2013 11:38:14 +, Duncan Booth wrote: > Denis McMahon wrote: >> 1) Find all the numbers less than n that are not divisible by a, b, or >> c. >> ask the user for x; >> assign the value 0 to some other variable i; >> while i is not greater than than x do the following [ >> if i

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Gary Herron
On 11/21/2013 03:55 PM, bradleybooth12...@gmail.com wrote: the problem i have is that it's just giving me the first number of the sequence not the actual sequence Not when I run it. After correcting the indentation errors, I get the correct sequence *except* that it's missing the first numbe

Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend]

2013-11-21 Thread Gregory Ewing
Tim Golden wrote: One of the (occasionally humbling) effects of internet communication is the realisation that the pop-culture reference you assumed would be instantly shared and understood by *any normal person anywhere* is, in fact, confined to your own back yard. Obviously we need a mail/new

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Terry Reedy
On 11/21/2013 6:55 PM, bradleybooth12...@gmail.com wrote: the problem i have is that it's just giving me the first number of the sequence not the actual sequence Please show actually copy/pasted input and output. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Terry Reedy
On 11/21/2013 6:17 PM, bradleybooth12...@gmail.com wrote: Coming back to the second question "The collatz process is as follows. Take a positive integer n greater than 1. while n is greater than 1 repeat the following; if N is even halve it and if N is odd multiply it by 3 and add 1. The (Uns

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread bradleybooth12345
the problem i have is that it's just giving me the first number of the sequence not the actual sequence -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Gary Herron
On 11/21/2013 03:17 PM, bradleybooth12...@gmail.com wrote: Coming back to the second question "The collatz process is as follows. Take a positive integer n greater than 1. while n is greater than 1 repeat the following; if N is even halve it and if N is odd multiply it by 3 and add 1. The (Uns

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread bradleybooth12345
Coming back to the second question "The collatz process is as follows. Take a positive integer n greater than 1. while n is greater than 1 repeat the following; if N is even halve it and if N is odd multiply it by 3 and add 1. The (Unsolved) collatz conjecture is that this process always termi

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Chris Angelico
On Thu, Nov 21, 2013 at 10:53 PM, Antoon Pardon wrote: > Op 20-11-13 19:09, Mark Lawrence schreef: >> I suggest that you write to the BBC and get all episodes of the >> extremely popular *COMEDY* "Dad's Army" withdrawn as "typical shabby >> Nazi trick" was one of Captain Mainwearing's main lines.

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Antoon Pardon
Op 20-11-13 19:09, Mark Lawrence schreef: > On 20/11/2013 17:51, Ned Batchelder wrote: >> On Wednesday, November 20, 2013 12:37:31 PM UTC-5, Mark Lawrence wrote: >>> On 20/11/2013 17:12, Ned Batchelder wrote: Nazi? Perhaps we could stick to more appropriate analogies? --Ned. >>

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Neil Cerutti
On Thu, Nov 21, 2013 at 10:48 AM, Chris Angelico wrote: > Well, a good British comedy does go around a long way. I have to say, > though, the shortness of the line makes it harder to recognize. Only > in the tightest of circles could one say "Bother that telephone!" and > have people understand th

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Anssi Saari
Dennis Lee Bieber writes: > Does Pan have an option to generate its own Message-ID header? > > Headers seem to indicate multiple injections somewhere Perhaps Pan doesn't? Someone else had multipostings in the Android group but he was posting via aioe. -- https://mail.python.org/mail

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Chris Angelico
On Fri, Nov 22, 2013 at 3:29 AM, Neil Cerutti wrote: > Many of the main villains in > the book are hilarious and mean-spirited parodies of > a series of British children's literature, The Wombles, > and a British TV show, Steptoe and Son, but the characters work > fine on their own. Yeah, that's

Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend]

2013-11-21 Thread Chris Angelico
On Thu, Nov 21, 2013 at 8:08 PM, Tim Golden wrote: > Of course, if some were to say "My name is Inigo Montoya; you killed my > father; prepare to die"... You killfiled my address - prepare to be ignored! ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend]

2013-11-21 Thread Tim Golden
On 21/11/2013 00:27, Steven D'Aprano wrote: > I fully support the right of everyone to make cryptic references to > movies, television shows, science fiction and fantasy novels, internet > memes, and assorted pop culture references. One of the (occasionally humbling) effects of internet communi

Re: Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend]

2013-11-20 Thread MRAB
On 21/11/2013 00:27, Steven D'Aprano wrote: On Wed, 20 Nov 2013 18:09:42 +, Mark Lawrence defended his reference to Nazism: It's an excellent analogy that I've used before, hence the smiley. Clearly you don't do any research before bothering to say anything. I for one *have* done extensiv

Off-topic: Pop culture references [was Re: Newbie - Trying to Help a Friend]

2013-11-20 Thread Steven D'Aprano
On Wed, 20 Nov 2013 18:09:42 +, Mark Lawrence defended his reference to Nazism: >>> It's an excellent analogy that I've used before, hence the smiley. >>> Clearly you don't do any research before bothering to say anything. I for one *have* done extensive research on the Nazis, not to a prof

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Chris Angelico
On Thu, Nov 21, 2013 at 5:18 AM, Ned Batchelder wrote: > On Wednesday, November 20, 2013 1:09:42 PM UTC-5, Mark Lawrence wrote: >> I suggest that you write to the BBC and get all episodes of the >> extremely popular *COMEDY* "Dad's Army" withdrawn as "typical shabby >> Nazi trick" was one of Capta

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Ned Batchelder
On Wednesday, November 20, 2013 1:35:06 PM UTC-5, Mark Lawrence wrote: > On 20/11/2013 18:18, Ned Batchelder wrote: > > On Wednesday, November 20, 2013 1:09:42 PM UTC-5, Mark Lawrence wrote: > >> On 20/11/2013 17:51, Ned Batchelder wrote: > >>> On Wednesday, November 20, 2013 12:37:31 PM UTC-5, Mar

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Mark Lawrence
On 20/11/2013 18:18, Ned Batchelder wrote: On Wednesday, November 20, 2013 1:09:42 PM UTC-5, Mark Lawrence wrote: On 20/11/2013 17:51, Ned Batchelder wrote: On Wednesday, November 20, 2013 12:37:31 PM UTC-5, Mark Lawrence wrote: On 20/11/2013 17:12, Ned Batchelder wrote: On Wednesday, Novembe

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Ned Batchelder
On Wednesday, November 20, 2013 1:09:42 PM UTC-5, Mark Lawrence wrote: > On 20/11/2013 17:51, Ned Batchelder wrote: > > On Wednesday, November 20, 2013 12:37:31 PM UTC-5, Mark Lawrence wrote: > >> On 20/11/2013 17:12, Ned Batchelder wrote: > >>> On Wednesday, November 20, 2013 11:29:54 AM UTC-5, Ma

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Mark Lawrence
On 20/11/2013 17:51, Ned Batchelder wrote: On Wednesday, November 20, 2013 12:37:31 PM UTC-5, Mark Lawrence wrote: On 20/11/2013 17:12, Ned Batchelder wrote: On Wednesday, November 20, 2013 11:29:54 AM UTC-5, Mark Lawrence wrote: On 20/11/2013 15:34, Alister wrote: On Thu, 21 Nov 2013 02:14:1

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Ned Batchelder
On Wednesday, November 20, 2013 12:37:31 PM UTC-5, Mark Lawrence wrote: > On 20/11/2013 17:12, Ned Batchelder wrote: > > On Wednesday, November 20, 2013 11:29:54 AM UTC-5, Mark Lawrence wrote: > >> On 20/11/2013 15:34, Alister wrote: > >>> On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: >

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Mark Lawrence
On 20/11/2013 17:12, Ned Batchelder wrote: On Wednesday, November 20, 2013 11:29:54 AM UTC-5, Mark Lawrence wrote: On 20/11/2013 15:34, Alister wrote: On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: On Thu, Nov 21, 2013 at 2:09 AM, Alister wrote: must be a strange quirk of pan & t

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Ned Batchelder
On Wednesday, November 20, 2013 11:29:54 AM UTC-5, Mark Lawrence wrote: > On 20/11/2013 15:34, Alister wrote: > > On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: > > > >> On Thu, Nov 21, 2013 at 2:09 AM, Alister > >> wrote: > >>> must be a strange quirk of pan & turned off hide to system

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 16:29:54 +, Mark Lawrence wrote: > On 20/11/2013 15:34, Alister wrote: >> On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: >> >>> On Thu, Nov 21, 2013 at 2:09 AM, Alister >>> wrote: must be a strange quirk of pan & turned off hide to system tray & allow

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Mark Lawrence
On 20/11/2013 15:34, Alister wrote: On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: On Thu, Nov 21, 2013 at 2:09 AM, Alister wrote: must be a strange quirk of pan & turned off hide to system tray & allow multiple instances. Hmm. Hard to know, but I can imagine that having multiple

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: > On Thu, Nov 21, 2013 at 2:09 AM, Alister > wrote: >> must be a strange quirk of pan & turned off hide to system tray & allow >> multiple instances. > > Hmm. Hard to know, but I can imagine that having multiple instances > MIGHT cause a

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: > On Thu, Nov 21, 2013 at 2:09 AM, Alister > wrote: >> must be a strange quirk of pan & turned off hide to system tray & allow >> multiple instances. > > Hmm. Hard to know, but I can imagine that having multiple instances > MIGHT cause a

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Thu, 21 Nov 2013 02:14:12 +1100, Chris Angelico wrote: > On Thu, Nov 21, 2013 at 2:09 AM, Alister > wrote: >> must be a strange quirk of pan & turned off hide to system tray & allow >> multiple instances. > > Hmm. Hard to know, but I can imagine that having multiple instances > MIGHT cause a

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Mark Lawrence
On 20/11/2013 15:06, Alister wrote: Ok this is now silly Apologies to everyone I am monitoring my network connection to confirm that i am not sending multiple times. Still arriving multiple times, shoot the messenger? :) -- Python is the second best programming language in the world. But the

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 14:49:59 +, Alister wrote: > On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > >> On 20/11/2013 09:29, Alister wrote: >>> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >>> On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano wrote: > 2 does count be

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Chris Angelico
On Thu, Nov 21, 2013 at 2:09 AM, Alister wrote: > must be a strange quirk of pan & turned off hide to system tray & allow > multiple instances. Hmm. Hard to know, but I can imagine that having multiple instances MIGHT cause a problem. But if that's confirmed (maybe fire up three copies and then p

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 15:06:44 +, Alister wrote: > On Wed, 20 Nov 2013 14:49:59 +, Alister wrote: > >> On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: >> >>> On 20/11/2013 09:29, Alister wrote: On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: > On 20 Nov 2013 03

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 14:49:59 +, Alister wrote: > On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > >> On 20/11/2013 09:29, Alister wrote: >>> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >>> On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano wrote: > 2 does count be

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Chris Angelico
On Thu, Nov 21, 2013 at 1:49 AM, Alister wrote: > On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > >> On 20/11/2013 09:29, Alister wrote: >>> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >> By the way, this is double posted and there were four identical messages >> from you yest

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > On 20/11/2013 09:29, Alister wrote: >> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >> >>> On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano >>> wrote: 2 does count because it isn't divisible by 3. The question states, "[cou

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > On 20/11/2013 09:29, Alister wrote: >> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >> >>> On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano >>> wrote: 2 does count because it isn't divisible by 3. The question states, "[cou

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > On 20/11/2013 09:29, Alister wrote: >> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >> >>> On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano >>> wrote: 2 does count because it isn't divisible by 3. The question states, "[cou

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 13:57:30 +, Mark Lawrence wrote: > On 20/11/2013 09:29, Alister wrote: >> On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: >> >>> On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano >>> wrote: 2 does count because it isn't divisible by 3. The question states, "[cou

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Mark Lawrence
On 20/11/2013 09:29, Alister wrote: On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano wrote: 2 does count because it isn't divisible by 3. The question states, "[count] how many positive integers less than N are not divisible by 2,3 or 5". Tw

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Duncan Booth
Denis McMahon wrote: > 1) Find all the numbers less than n that are not divisible by a, b, or c. > > ask the user for x; > assign the value 0 to some other variable i; > while i is not greater than than x do the following [ > if i is not divisible by a and i is not divisible by b and i is not >

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: > On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano > wrote: >> 2 does count because it isn't divisible by 3. The question states, >> "[count] how many positive integers less than N are not divisible > by 2,3 >> or 5". Two is not divisible by 3, so

Re: Newbie - Trying to Help a Friend

2013-11-20 Thread Alister
On Wed, 20 Nov 2013 00:54:28 -0500, Dave Angel wrote: > On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano > wrote: >> 2 does count because it isn't divisible by 3. The question states, >> "[count] how many positive integers less than N are not divisible > by 2,3 >> or 5". Two is not divisible by 3, so

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Dave Angel
On 20 Nov 2013 03:52:10 GMT, Steven D'Aprano wrote: 2 does count because it isn't divisible by 3. The question states, "[count] how many positive integers less than N are not divisible by 2,3 or 5". Two is not divisible by 3, so "not divisible by 2,3 or 5" is true, so two gets counted. Th

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Steven D'Aprano
On Tue, 19 Nov 2013 22:10:55 -0500, Dave Angel wrote: > On 20 Nov 2013 00:17:23 GMT, Steven D'Aprano > 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: >

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Dave Angel
On 20 Nov 2013 00:17:23 GMT, Steven D'Aprano 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 coun

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Steven D'Aprano
On Tue, 19 Nov 2013 10:40:18 -0800, bradleybooth12345 wrote: > Hi, > > A Friend is doing maths in University and has had some coursework to do > with python. > > The question is > > "Write a program that calculates how many positive integers less than N > are not divisible by 2,3 or 5. The user

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Mark Janssen
> Think they just needed a starting point really to be honest as they can't get > there head round it. Then the problem is that your friend doesn't understand one or more of the words being used. This is s necessary prerequisite for making an algorithm from a text description. Perhaps they don'

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Denis McMahon
On Tue, 19 Nov 2013 11:27:08 -0800, bradleybooth12345 wrote: > On Tuesday, November 19, 2013 6:40:18 PM UTC, bradleyb...@gmail.com > wrote: >> "Write a program that calculates how many positive integers less than N >> are not divisible by 2,3 or 5. >> "The collatz process . >> Any help woul

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread bradleybooth12345
On Tuesday, November 19, 2013 6:40:18 PM UTC, bradleyb...@gmail.com wrote: > Hi, > > > > A Friend is doing maths in University and has had some coursework to do with > python. > > > > The question is > > > > "Write a program that calculates how many positive integers less than N are > n

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Gary Herron
On 11/19/2013 10:40 AM, bradleybooth12...@gmail.com wrote: Hi, A Friend is doing maths in University and has had some coursework to do with python. The question is "Write a program that calculates how many positive integers less than N are not divisible by 2,3 or 5. The user should be prompt

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Neil Cerutti
bradleybooth12...@gmail.com via python.org asks: > A Friend is doing maths in University and has had some > coursework to do with python. > > The question is > > "Write a program that calculates how many positive integers > less than N are not divisible by 2,3 or 5. The user should be > prompted to

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread maxwell34m
On Tuesday, November 19, 2013 10:40:18 AM UTC-8, bradleyb...@gmail.com wrote: > Hi, > > > > A Friend is doing maths in University and has had some coursework to do with > python. > > > > The question is > > > > "Write a program that calculates how many positive integers less than N are

Newbie - Trying to Help a Friend

2013-11-19 Thread bradleybooth12345
Hi, A Friend is doing maths in University and has had some coursework to do with python. The question is "Write a program that calculates how many positive integers less than N are not divisible by 2,3 or 5. The user should be prompted to supply the Number N. Demonstrate your program output