Creating a Program to Decompose a Number and Run a Function on that Decomposition
CTSB01
scott.moore270 at gmail.com
Thu Jul 18 17:57:58 EDT 2013
On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote:
> On 18 July 2013 00:58, CTSB01 <scott.moore270 at gmail.com> wrote:
>
> > Please let me know if this is unclear. I will certainly continue revising until it makes sense to those reading.
>
>
>
> Can you summarize what your question is? Leave aside the details of
>
> the function, just explain what thing in particular you aren't able
>
> to do.
Hi Joshua,
I actually managed to find a certain block like this:
def phi_m(x, m):
... rtn = []
... for n2 in range(0, len(x) * m - 2:
... n = n2 / m
... r = n2 - n * m
... rtn.append(m * x[n] + r * (x[n + 1] - x[n]))
... print 'n2 =', n2, ': n =', n, ' r =' , r, ' rtn =', rtn
... rtn
However, I am getting the error "expected an indented block" on line two. Any idea why?
More information about the Python-list
mailing list