[Tutor] Python Interview Questions..
Prasad, Ramit
ramit.prasad at jpmchase.com
Thu May 26 19:34:49 CEST 2011
> When giving an interview, I ask interviewees to write samples of code.
Would you ask your code samples for a python (or XXX language) position do you have them code it in...C or actually code it in Python (or XXX language)?
> Another favorite of mine was asking a candidate to write a piece of code that took a paragraph of text as a parameter, and while maintaining the order of the sentences, reverse the order of the words in each sentence.
I ask because this would be fairly easy in Python (admitted my interview solution would have problems with handling punctuations), but probably a lot more complex in something like C.
Is C still the standard interviewing basis for the computer science basics (e.g. data structures, algorithms, etc)?
Ramit
Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423
From: tutor-bounces+ramit.prasad=jpmchase.com at python.org [mailto:tutor-bounces+ramit.prasad=jpmchase.com at python.org] On Behalf Of ian douglas
Sent: Tuesday, May 24, 2011 5:51 PM
To: Neha P
Cc: tutor at python.org
Subject: Re: [Tutor] Python Interview Questions..
To expand on Martin's questions, when I've interviewed in the past, I've asked (or been asked as an interviewee) questions that investigate critical thinking, like those silly-sounding questions of "how many golf balls would fit in a bus" or "how many windows are there in Seattle". Those kinds of questions are meant to gauge how you think through a problem, not necessarily coming up with the correct answer.
When giving an interview, I ask interviewees to write samples of code. A popular one is to write the Fibonacci algorithm in code, or how to write a quick-sort or merge-sort algorithm. Being familiar with some of these computer science principles will show your familiarity with lower level understandings of how software works. It also helps identify people who are self-taught and only know higher level operations, and those who have gone to college/university for computer science or formal software development training.
Another favorite of mine was asking a candidate to write a piece of code that took a paragraph of text as a parameter, and while maintaining the order of the sentences, reverse the order of the words in each sentence. So "The sky was blue. The grass was green." would become "blue was sky The. green was grass The."
Good luck on your interviewing.
-id
On 05/24/2011 03:11 PM, Martin A. Brown wrote:
Hi there,
: Hey I'll be appearing for Job Interviews and wondering if anybody
: of you appeared for a Python Interview Or if on the other end as
: an interviewer. Can you please share the questions asked?
: That will be of great help :)
I would point out that there are many types of interviews. There's
the technical screen, which is what it sounds like you are asking
about, but there are other types of interviews that tend to focus on
drawing out your approach to problems or your mindset. With the
latter type of interview, I would only suggest that you know
yourself.
If however, you are worried about the technical content of an
interview, it is possible that having my list of questions may help
you. It may also hinder you, because the set of questions that I
ask may differ dramatically from another technical interviewer. We
are a fickle lot, prone to ask questions we (think we) know the
answers to, which may differ from what you know [0].
With that said, here's a subset of the questions that I commonly use
when interviewing candidates for a technical screen--I would rarely
ask all of these.
* What's your favorite stdlib module? (And, why?)
* Distinguish a dict() and a set(). When would I use which?
* Distinguish a tuple() and a list(). When would I use which?
* What's the risk of 't = sys.stdin.readlines()'?
* What's an iterator? Why would I care?
* When should I use 'with'? Is there any advantage?
* What's a regex? Why not just use string matching?
* What does os.stat() return? For what is this useful?
* What's WSGI? Why would I use it?
* What are ElementTree and lxml?
* What's a decorator?
* What (unit) testing tools exist and how would I use them?
* What does 'raise' do? What does 'pass' do?
* Describe Python's inheritance model.
And, some others that are geared more toward those who have written
network (or SQL) applications:
* What's a file descriptor?
* What's a socket?
* How do I create a listening socket in Python?
* What's a signal?
* How do I talk to a SQL DB from Python? Any other DBs?
* What tools are available for calling an external process?
* What's a queue?
* What's a thread? Are there any (special) concerns about
threads I should have as a Python programmer?
If you have some familiarity with Python (particularly in a
Unix-like environment) many of these questions would be familiar to
you. I would get some idea of your facility with the language and
the underlying operating system from the accuracy and comfort with
which you answered. You might also find one or two of these
(mis)leading and might want to tell me about corner cases that you
as a developer have faced. That would also be interesting to me as
a technical interviewer.
-Martin
[0] http://www.quotationspage.com/quote/12220.html
_______________________________________________
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to European legal entities.
More information about the Tutor
mailing list