Re: [Tutor] Geometric sequence

2013-10-30 Thread bob gailer
On 10/30/2013 1:08 PM, Peter O'Doherty wrote: Hi List, I know a geometric sequence can be produced by: series = [2**x for x in range(7)] But I would like to curtail the sequence before the last element excedes a certain value. import itertools series = [2**x for x in itertools.takewhile(lamb

Re: [Tutor] Custom Input Subprocess

2013-10-30 Thread Dave Angel
On 30/10/2013 19:49, Kenny Stier' wrote: > I am brand new to Python, and I would like to create a GUI Program that > downloads files at certain times using the Linux terminal. I have the Linux > terminal part down, and using subprocess can execute that, but I can't > allow people to, in the GUI, i

Re: [Tutor] Geometric sequence

2013-10-30 Thread Dave Angel
On 30/10/2013 13:08, Peter O'Doherty wrote: > Hi List, > > I know a geometric sequence can be produced by: > > series = [2**x for x in range(7)] > > But I would like to curtail the sequence before the last element excedes > a certain value. Is there a better way of doing it that the following: >

Re: [Tutor] Geometric sequence

2013-10-30 Thread Oscar Benjamin
On Oct 31, 2013 12:10 AM, "Mark Lawrence" wrote: > > On 30/10/2013 17:08, Peter O'Doherty wrote: >> >> Hi List, >> >> I know a geometric sequence can be produced by: >> >> series = [2**x for x in range(7)] >> >> But I would like to curtail the sequence before the last element excedes >> a certain

Re: [Tutor] grading programm

2013-10-30 Thread Mark Lawrence
On 30/10/2013 18:30, moemedi baboile wrote: please me help to create a program that allows the use to enter the marks for their subjects and tells them the number of subjects they are failing If you search the archives for this list you'll find plenty of articles about how to design your prog

Re: [Tutor] grading programm

2013-10-30 Thread Alan Gauld
On 30/10/13 18:30, moemedi baboile wrote: please me help to create a program that allows the use to enter the marks for their subjects and tells them the number of subjects they are failing This sounds like homework and we don't do homework for you. If you tell us what you have tried we can sug

Re: [Tutor] Geometric sequence

2013-10-30 Thread Mark Lawrence
On 30/10/2013 17:08, Peter O'Doherty wrote: Hi List, I know a geometric sequence can be produced by: series = [2**x for x in range(7)] But I would like to curtail the sequence before the last element excedes a certain value. Is there a better way of doing it that the following: for x in range

Re: [Tutor] Custom Input Subprocess

2013-10-30 Thread Alan Gauld
On 30/10/13 23:49, Kenny Stier' wrote: import subprocess subprocess.call(["at", "-f", "download.sh", "7:11 PM"]) But using the GUI, they need to be able to input their own text where the time is, and where it says "download.sh". How do I do this? Thanks! What exactly is your problem? Do you k

Re: [Tutor] Geometric sequence

2013-10-30 Thread Alan Gauld
On 30/10/13 17:08, Peter O'Doherty wrote: Hi List, I know a geometric sequence can be produced by: series = [2**x for x in range(7)] But I would like to curtail the sequence before the last element excedes a certain value. You can add an if clause to the comprehension: series = [2**x for x

[Tutor] grading programm

2013-10-30 Thread moemedi baboile
please meĀ help to create a program that allows the use to enter the marks for their subjects and tells them the number of subjects they are failing___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.

[Tutor] Custom Input Subprocess

2013-10-30 Thread Kenny Stier'
I am brand new to Python, and I would like to create a GUI Program that downloads files at certain times using the Linux terminal. I have the Linux terminal part down, and using subprocess can execute that, but I can't allow people to, in the GUI, input some of the command in themselves. The curren

[Tutor] Geometric sequence

2013-10-30 Thread Peter O'Doherty
Hi List, I know a geometric sequence can be produced by: series = [2**x for x in range(7)] But I would like to curtail the sequence before the last element excedes a certain value. Is there a better way of doing it that the following: for x in range(20): series_element = 2**x print s