Damco Solutions
Tech Mahindra Interview Questions and Answers
Q1. What is Django request response cycle.?
Django request response cycle is the process of handling a request and generating a response in Django web framework.
Client sends a request to the server.
The request is received by the Django server.
Django uses URL patterns to match the requested URL to a view function.
The view function processes the request and returns an HTTP response.
The response is sent back to the client.
Q2. How to define private variables ?
Private variables are defined using access modifiers to restrict their access within a class.
Use the 'private' keyword to define a private variable
Private variables can only be accessed within the class they are defined in
Private variables are often used to encapsulate data and prevent direct access from outside the class
Q3. Which version visual c# you work on?
I work on Visual C# 2019.
I primarily work on Visual C# 2019 for my software development projects.
I have experience with Visual C# 2017 and earlier versions as well.
Visual C# 2019 offers new features and improvements over previous versions.
Q4. Difference between list and tuple, list and array.
Lists and tuples are similar but tuples are immutable. Arrays are fixed size while lists are dynamic.
Lists and tuples are both used to store collections of data.
Tuples are immutable, meaning their values cannot be changed once created.
Lists are dynamic and can be resized during runtime.
Arrays are fixed size and can only store elements of the same data type.
Lists and arrays can be indexed and sliced to access specific elements.
Example: list = [1, 2, 3], tuple = (4, 5, 6), arra...read more
Q5. Oops concept, and 4 pillars of oops.
Oops concept is a programming paradigm based on the principles of abstraction, encapsulation, inheritance, and polymorphism.
Abstraction: Hiding the implementation details and showing only the necessary information to the user.
Encapsulation: Binding the data and methods together to protect the data from outside interference.
Inheritance: Creating a new class from an existing class to reuse the code and add new features.
Polymorphism: Using a single interface to represent differe...read more
Q6. What is django signals?
Django signals allow certain senders to notify a set of receivers that some action has taken place.
Signals allow decoupled applications to get notified when certain actions occur elsewhere in the application
They are used to avoid coupling between applications
Signals are defined by providing a receiver function which gets called when the signal is sent
Example: A signal can be sent when a new user is created, and a receiver function can be defined to send a welcome email to the...read more
Q7. What is decorator. ?
A decorator is a design pattern that allows behavior to be added to an individual object, either statically or dynamically.
Decorators wrap an object to modify its behavior.
They provide a flexible alternative to subclassing for extending functionality.
Python has built-in support for decorators, which are denoted by the @ symbol.
Examples of decorators include @staticmethod, @classmethod, and @property.
Q8. Difference between pull and push
Pull is when the client initiates the request for data, while push is when the server sends data without a request.
Pull: Client initiates request for data
Push: Server sends data without request
Pull: Used in polling mechanisms
Push: Used in real-time communication systems
Q9. Difference between pull and fetch
Pull and fetch are both Git commands used to update a local repository with changes from a remote repository, but they have different behaviors.
Pull: updates the current branch with changes from the remote repository and merges them into the local branch.
Fetch: downloads changes from the remote repository to the local repository, but does not merge them into the local branch.
Pull is a combination of fetch and merge, while fetch only downloads changes.
Fetch is useful for revie...read more
More about working at Damco Solutions
Top HR Questions asked in Tech Mahindra
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month