Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'function,': 0.09; 'len(x)': 0.09; 'subject:Function': 0.09; 'subject:Number': 0.09; 'def': 0.12; 'range(0,': 0.16; 'subject: \n ': 0.16; 'summarize': 0.16; 'two.': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'do.': 0.18; '>>>': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; "aren't": 0.24; 'certainly': 0.24; 'question': 0.24; 'this:': 0.26; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'leave': 0.29; 'is?': 0.30; 'getting': 0.31; 'gary': 0.31; 'subject:that': 0.31; 'sense': 0.34; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'explain': 0.39; 'aside': 0.39; 'to:addr:python.org': 0.39; 'july': 0.63; 'details': 0.65; 'institute': 0.72; 'received:10.10': 0.74; 'received:204': 0.75; 'dr.': 0.77; "'for'": 0.84; 'why?': 0.91; '2013': 0.98 Date: Thu, 18 Jul 2013 15:12:52 -0700 From: Gary Herron User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition References: <8a23cbf1-3cfd-48e3-a460-64551119fde7@googlegroups.com> <537e9d19-6587-4773-8910-df4005505653@googlegroups.com> In-Reply-To: <537e9d19-6587-4773-8910-df4005505653@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374185582 news.xs4all.nl 15932 [2001:888:2000:d::a6]:37068 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50870 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 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