On Fri, May 30, 2014 at 11:06 PM, Ritwik Raghav
wrote:
> That's all the code I'm writing.
>
That can't be true - the 11 lines of code you posted doesn't include
anything that would give you "Correct Return Value: No", let alone any
reference to PersistentNumber. From the error message, it would
That's all the code I'm writing. The complete problem statement is:
http://pastebin.com/E970qYXk
On Sat, May 31, 2014 at 11:25 AM, Marc Tompkins
wrote:
> On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav
> wrote:
>
>
>> It has again given some error I do not understand. This time my code is:
>>
On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav
wrote:
> It has again given some error I do not understand. This time my code is:
>
> count = 0
> def getPersistence(self,n):
>
> product = 1
> if len(str(n)) == 1:
> return self.count
> else:
> a = str(n)
> for
Peter Otten wrote:
>Ritwik Raghav wrote:
>
>> I joined the topcoder community tomorrow and tried solving the
>> PersistentNumber problem:
>> "Given a number x, we can define p(x) as the product of the digits of x.
>> We can then form a sequence x, p(x), p(p(x))... The persistence of x is
>> then d
Alan Gauld wrote:
>On 30/05/14 14:14, Ritwik Raghav wrote:
>> I joined the topcoder community tomorrow and tried solving the
>> PersistentNumber problem:
>
>Time travel! I love it already... :-)
>
>> 8*1 = 8. Thus, the persistence of 99 is 2. You will be given n, and you
> >must return its persist
Thanks for the response Alan. I forgot to reply to tutor on my 2nd
comment. Just incase someone might want to see it, here it is:
"Okay I think learning how to scrap (library or framework) is not
worth the trouble. Especially if some people consider it illegal.
Thanks for the input."
_
On Fri, May 30, 2014 at 7:20 PM, Alan Gauld wrote:
>
>
>> If a site offers an API that returns the data you need then use it,
>> If not you have few alternatives to scraping (although scraping
>> may be 'illegal' anyway due to the impact on other users). But scraping,
>> whether a web page or a GU
On 30/05/14 10:41, Aaron Misquith wrote:
Like pypdf is used to convert pdf to text; is there any library that is
used in converting .ppt files to .txt? Even some sample programs will be
helpful.
Bearing in mind that Powerpoint is intended for graphical presentations
the text elements are not n
On 30/05/14 18:25, Matthew Ngaha wrote:
Hey all. I've been meaning to get into web scraping and was pointed to
the directions of lxml (library) and scrapy (framework). Can I ask in
terms of web scraping, what's the difference between a library and a
framework?
I don;t know of anything web speci
Hey all. I've been meaning to get into web scraping and was pointed to
the directions of lxml (library) and scrapy (framework). Can I ask in
terms of web scraping, what's the difference between a library and a
framework? Surely everyone should use a framework but I get the idea
more people use the
On Fri, May 30, 2014 at 2:41 AM, Aaron Misquith
wrote:
> Like pypdf is used to convert pdf to text; is there any library that is
> used in converting .ppt files to .txt? Even some sample programs will be
> helpful.
>
I suspect you'd need to use PowerPoint itself to do that cleanly; you can
defin
Like pypdf is used to convert pdf to text; is there any library that is
used in converting .ppt files to .txt? Even some sample programs will be
helpful.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.p
Ritwik Raghav wrote:
> I joined the topcoder community tomorrow and tried solving the
> PersistentNumber problem:
> "Given a number x, we can define p(x) as the product of the digits of x.
> We can then form a sequence x, p(x), p(p(x))... The persistence of x is
> then defined as the index (0-base
On 30/05/14 14:14, Ritwik Raghav wrote:
I joined the topcoder community tomorrow and tried solving the
PersistentNumber problem:
Time travel! I love it already... :-)
8*1 = 8. Thus, the persistence of 99 is 2. You will be given n, and you
must return its persistence."
It asks to define a fun
I joined the topcoder community tomorrow and tried solving the
PersistentNumber problem:
"Given a number x, we can define p(x) as the product of the digits of x. We
can then form a sequence x, p(x), p(p(x))... The persistence of x is then
defined as the index (0-based) of the first single digit num
15 matches
Mail list logo