Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50870

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

Date 2013-07-18 15:12 -0700
From Gary Herron <gherron@digipen.edu>
Subject Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition
References <8a23cbf1-3cfd-48e3-a460-64551119fde7@googlegroups.com> <mailman.4835.1374138776.3114.python-list@python.org> <537e9d19-6587-4773-8910-df4005505653@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.4846.1374185582.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 07/18/2013 02:57 PM, CTSB01 wrote:
> On Thursday, July 18, 2013 5:12:08 AM UTC-4, Joshua Landau wrote:
>> On 18 July 2013 00:58, CTSB01 <scott.moore270@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:
That 'for' line has miss-matched parentheses.
> ...     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?


-- 
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-17 16:58 -0700
  Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Joshua Landau <joshua@landau.ws> - 2013-07-18 10:12 +0100
    Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 14:57 -0700
      Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Gary Herron <gherron@digipen.edu> - 2013-07-18 15:12 -0700
        Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 15:18 -0700
          Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-18 16:49 -0600
            Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 16:04 -0700
              Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-18 17:42 -0600
              Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-18 17:45 -0600
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 17:25 -0700
              Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-07-19 00:48 +0100
              Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Dave Angel <davea@davea.name> - 2013-07-18 19:49 -0400
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 17:35 -0700
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Dave Angel <davea@davea.name> - 2013-07-18 21:04 -0400
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 19:16 -0700
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Dave Angel <davea@davea.name> - 2013-07-18 22:43 -0400
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 19:56 -0700
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition Fábio Santos <fabiosantosart@gmail.com> - 2013-07-19 03:48 +0100
                Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition CTSB01 <scott.moore270@gmail.com> - 2013-07-18 19:54 -0700

csiph-web