RE: Creating a Simple User Interface for a Function

2013-07-26 Thread Prasad, Ramit
CTSB01 wrote: > On Thursday, July 25, 2013 3:19:27 PM UTC-4, Dave Angel wrote: > > On 07/25/2013 12:03 PM, CTSB01 wrote: > > > > > I have the following code that runs perfectly: > > > > > > > def psi_j(x, j): > > > > >rtn = [] > > > > >for n2 in range(0, len(x) * j - 2

Re: Creating a Simple User Interface for a Function

2013-07-25 Thread Terry Reedy
Some additional comments. On 7/25/2013 7:00 PM, Terry Reedy wrote: On 7/25/2013 4:58 PM, CTSB01 wrote: 1) I decided to use Python 2.7, and I will be sure to specify this in all future threads. Given that you are not using any libraries, let alone one that does not run on Python 3, I strongly

Re: Creating a Simple User Interface for a Function

2013-07-25 Thread Dave Angel
On 07/25/2013 04:58 PM, CTSB01 wrote: Sorry Dave, to answer each part of your response: 1) I decided to use Python 2.7, and I will be sure to specify this in all future threads. 2) It is a list of positive integers. In fact, it is always going to be a list of positive increasing integer

Re: Creating a Simple User Interface for a Function

2013-07-25 Thread Terry Reedy
On 7/25/2013 4:58 PM, CTSB01 wrote: 1) I decided to use Python 2.7, and I will be sure to specify this in all future threads. Given that you are not using any libraries, let alone one that does not run on Python 3, I strongly recommend using the latest version (3.3). 2) It is a list of posit

Re: Creating a Simple User Interface for a Function

2013-07-25 Thread CTSB01
On Thursday, July 25, 2013 3:19:27 PM UTC-4, Dave Angel wrote: > On 07/25/2013 12:03 PM, CTSB01 wrote: > > > I have the following code that runs perfectly: > > > > def psi_j(x, j): > > >rtn = [] > > >for n2 in range(0, len(x) * j - 2): > > > n = n2 /

Re: Creating a Simple User Interface for a Function

2013-07-25 Thread Dave Angel
On 07/25/2013 12:03 PM, CTSB01 wrote: I have the following code that runs perfectly: def psi_j(x, j): rtn = [] for n2 in range(0, len(x) * j - 2): n = n2 / j r = n2 - n * j rtn.append(j * x[n] + r * (x[n + 1] - x[n]))

Creating a Simple User Interface for a Function

2013-07-25 Thread CTSB01
I have the following code that runs perfectly: def psi_j(x, j): rtn = [] for n2 in range(0, len(x) * j - 2): n = n2 / j r = n2 - n * j rtn.append(j * x[n] + r * (x[n + 1] - x[n])) print 'n2 =', n2, ': n =', n, ' r =' , r, '