Python developer Interview Questions | Glassdoor

Python developer Interview Questions

"Python developers are responsible for developing code to build products using the python programming language. In an interview context, expect to be quizzed on your technical skills through different kinds of computing problems or brainteasers. The specific questions you are asked will depend on what type of programming position you are looking for. Try researching a specific discipline such as web development, application development, or system development."

Top Interview Questions

Sort: RelevancePopular Date

Write a function to return the nth fibonacci number. The first two can be assumed to be 1 and 1. The third and fourth are then calculated to be 2 and 3.

3 Answers

The matlab example sets N = 12 (the 12th fab. number) which happens to be 144. N = 12; f = ones(N,1); for i = 3:N; f(i) = f(i-1) + f(i-2); end; f(end)

fib = {1:1, 2:1} def calc_fib(n): if n in fib.keys(): return fib[n] else: fib[n]=calc_fib(n-1)+calc_fib(n-2) return fib[n] print(calc_fib(9))

remember how to approximate as N is large

How would you write a program to move inside a square spiral? Start at the upper left corner of the square and walk its edges clockwise. Just before re-approaching the upper left corner, spiral into the square instead, ultimately arriving at the center of the square.

2 Answers

For the years 1901 to 2000, count the total number of Sundays that fell on the first of a month.

2 Answers

Given a set of 50 unique DNA segments under 1000 characters that is guaranteed to overlap into one single segment, write a program that will align them.

1 Answer

How would you triage and go about fixing infrastructure problems? Giving an input file, get the number of lines matching a specific piece of text using bash scripting. Give the percentage of lines in the file that match that string.

3 Answers

Given a very long string composed of numbers as characters, find the four character substring that has the largest multiple. For example, given the string "809723", the two char substring with the largest multiple is "97", having a multiple 9*7 = 63.

4 Answers

work history stuff then a long comprehensive test to complete in 48 hours

3 Answers

Hackerrank test: 1) Print Roman number equivalent for numbers 1-1000 2) Order a list of words appearing in a file by number of letters but maintain original order ("stable sorting") of words with same length 3) Implement a stack class with methods to do some specific operations mentioned in the question. Phone/Codepad interview: 1) Given a series of prices, find the one buy/sell trade pair which gives the maximum profit 2) Modification of 1. For the same prices, find the maximum profit possible with any number of buy/sell allowed (at each step/price, you can buy, sell or do nothing, no short sell allowed)

2 Answers

Transform an integer to a string using only arithmetic operations. Known in C as 'itoa'.

2 Answers

-Telephonic interview was pretty much related to your past experience and what you have worked on. -Online exam was very bad. Mostly concern for syntax. It isn't related to logic or programming. The worst exam i have ever seen.

1 Answer
110 of 148 Interview Questions