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
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
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-based) of
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:
On Fri, May 30, 2014 at 2:41 AM, Aaron Misquith aaronmisqu...@gmail.com
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
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 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
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
On Fri, May 30, 2014 at 7:20 PM, Alan Gauld alan.ga...@btinternet.com 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
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.
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 persistence.
It
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 defined as
On Fri, May 30, 2014 at 10:16 PM, Ritwik Raghav ritwikragha...@gmail.com
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)
13 matches
Mail list logo