Sony interview questions
Python interview questions in Sony India software
This is a part of my job interviews series.
Background
- Years of Experience: 4.5 years
- Relevant Python experience: 2 years
- Year: August 2016
- Campus:
- Position: Python developer
- Company: Sony India Software
Interview discussions
I have mentioned the main questions and the ladder questions around that question under it.
First phase
- What are
Decorators
and why do we use them? Multiprocessing and Multithreading in Python
source: Lei Mao's blog
In multiprocessing, discussed parent, child relation concept.
- How a parent will know that a process's invoker has been killed?
Differences between
__repr__
and__str__
in Python?the goal of
__repr__
is to be unambiguous and__str__
is to be readable.Checkout further good answers on stackoverflow
How to implement stack and queue in Python?
Stack (LIFO)
class Stack: def __init__(self): self.stack = [] def pop(self): if len(self.stack) < 1: return None return self.stack.pop() def push(self, item): self.stack.append(item) def size(self): return len(self.stack)
Queue (FIFO)
class Queue: def __init__(self): self.queue = [] def enqueue(self, item): self.queue.append(item) def dequeue(self): if len(self.queue) < 1: return None return self.queue.pop(0) def size(self): return len(self.queue)
- reference
How does Python interprets?
- How to run a module if I delete its
*.py
file, but the*.pyc
file is present?- Yes, we can run the
.pyc
file directly without*.py
file.
- Yes, we can run the
- How does memory management happen in Python?
- How to know what are the attributes/methods present of a class or object?
- using
dir
- using
- Have you worked on SQLAlchemy?
- Write a program to write:
- 'd' in place of 'a',
- 'e' in place of 'b', .. .. ..
- 'a' in place of 'w' with proper unit test cases.
Second phase
Did not qualify. Failed in Unit test writing.
Result
Not qualified
Analysis
What went well
What went well and I should keep doing further:
- The interview discussion went well.
- I was responding calmly with a pause after the question, framing my answer in a structured way with keywords, which the other person want to hear.
Need improvement
What did not go well or I have not planned for and I need to improve:
- I need to improve on live coding. Though the problem was not tough, due to lack of practice on coding when someone is watching you code every letter made me nervous.
- I need to improve my Unit testing skills; learn
pytest
.
I have appeared in 20+ interviews so far. You can check out my job interview series for the rest of the interviews experiences.
Let me know if you have any further questions. Thank You.
Did you find this article valuable?
Support Soumendra kumar sahoo by becoming a sponsor. Any amount is appreciated!