Sony interview questions

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

  1. What are Decorators and why do we use them?
  2. Multiprocessing and Multithreading in Python

  3. In multiprocessing, discussed parent, child relation concept.

  4. How a parent will know that a process's invoker has been killed?
  5. 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

  6. 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
  7. How does Python interprets?

  8. 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.
  9. How does memory management happen in Python?
  10. How to know what are the attributes/methods present of a class or object?
    • using dir
  11. Have you worked on SQLAlchemy?
  12. 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.