Tech Mahindra interview questions
Python interview questions in Tech Mahindra
This is a part of my job interviews series.
Background
- Years of Experience: 4 years
- Relevant Python experience: 1.5 years
- Year: February 2016
- Campus: Dairy circle, Bengaluru (now closed permanently)
- Position: Python developer
- Company: Tech Mahindra
Interview discussions
I have mentioned the main questions and the ladder questions around that question under it.
First round
- What is Class?
- Entities of an application under development is called objects.
- In Python, every entity is an object.
- Class defines objects.
- Method defines the behaviour of the class.
- What is inheritance?
- Inheritance is the property of OOP where
- A class extends/inherits the methods and properties of another base class
- It maintains the hierarchy
- Increases reusability
- Regex to find an IP address
- Difference between
extend
andappend
? - What is Abstract class?
- Which keeps the underlying complexities of the class away from class
- What is dictionary comprehension
- Like list comprehension for Dictionaries
- What is a constructor?
- Which constructs something
- The
__init__
in a class
- What is a Generator?
- It generates in the runtime on every loop call
- Difference between
range
andxrange
? range
is a listxrange
is a generatorxrange
isrange
in Python 3
Second round onwards
Did not qualify. I was weak in the OOPs concepts.
Verdict
Rejected
My opinion
- I was not fully prepared, as it was near to my Accenture office I went.
- This was my first Python interview. I want to check how in the market Python questions are being asked.
- I got to know I have a lot to study. I was self-studying Python.
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.