[Tutor] Python Interview Questions..

Walter Prins wprins at gmail.com
Fri May 27 16:37:45 CEST 2011


Hi Colin,

On 27 May 2011 14:41, col speed <ajarncolin at gmail.com> wrote:

> I've been learning Python on and off for the past 3 years, as a hobby.
> I am over 50 years old, so will never be a programmer. However:
>

Well just because you're 50 years old doesn't mean you will never be a
programmer ;)


> 1/ I've done a bit in Project Euler and have found many algorithms to get
> prime numbers. There is one that is 10 times faster than any other that I
> have found, it uses numpy. Unfortunately, I don't understand it at all.
> However,  neither would I understand Python's sort method, but I still use
> it.
>

It's this awareness (that you clearly already have0 that I submit is often
(sadly) lacking in many programmers.  So there mere fact that you're
pointing this out tells me that you already have, at least, a feel/awareness
that not all algorithms are equal, regardless of whether you understand
why/how.


> I suppose that what I'm trying to say is that there will always be a need
> for "experts" that know different OS's and how a computer works inside, and
> there will also be a need for coders who code a programme that is needed at
> a certain time.
>
> Is there really a time that knowing that "list" is interpreted as
> "10010001000100010010000100010010" is important these days?
>

No, but that wasn't IMHO the point being made.  It's more about how (for
example) lists in general behave (e.g. having at least a feel for the cost
of various operations etc) and (by contrast) also how **Python's** list
implementation behaves (which is not the same as a classical linked list.
Python lists (CPython at least) are IIRC actually implemented as dynamic
arrays of pointers, which means that some operations don't cost as much as
they would do with a "true" nodular linked list implementation, while other
operations cost more etc. etc.)

Best wishes (hoping this was not perceived as a flame as it wasn't intended
as one!)

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110527/1414a2cd/attachment.html>


More information about the Tutor mailing list