Re: [Tutor] Python code trouble!

2011-11-22 Thread Asokan Pichai
Okay! I wrote some code. It is below so that you can avoid scrolling down and seeing it if you do not want to see any code! HTH Asokan people = list(" ABCDEFGHIJKLMN") COUNT = len(people) remove = 3 SPACE = ' ' def survivorCount(a): return len(a) - a.count(

Re: [Tutor] Python code trouble!

2011-11-21 Thread Dave Angel
On 11/21/2011 06:57 PM, Steven D'Aprano wrote: Hello John, You are still posting from the future. Please fix your computer so that it is no longer set 12 hours in the future. Or perhaps your computer is just set in the wrong time zone. John wrote: Hi all, I have attempted to create a pro

Re: [Tutor] Python code trouble!

2011-11-21 Thread Steven D'Aprano
Hello John, You are still posting from the future. Please fix your computer so that it is no longer set 12 hours in the future. Or perhaps your computer is just set in the wrong time zone. John wrote: Hi all, I have attempted to create a programme which removes every Nth person from the

Re: [Tutor] Python code trouble!

2011-11-21 Thread Dave Angel
You're still posting from tomorrow. On 11/22/2011 05:50 AM, John wrote: Hi all, I have attempted to create a programme which removes every Nth person from the list until there is only one name remaining. N is inputted by the user. Here is the code: def survivor(names, step): next = nam

[Tutor] Python code trouble!

2011-11-21 Thread John
Hi all, I have attempted to create a programme which removes every Nth person from the list until there is only one name remaining. N is inputted by the user. Here is the code: def survivor(names, step): next = names while len(next) > 1: index = step - 1 next.remove (next[i