Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Cognizant Team. If you also belong to the team, you can get access from here

Cognizant Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

Cognizant Python Developer Interview Questions and Answers

Updated 7 Aug 2024

10 Interview questions

🔥 Asked by recruiter 2 times
A Python Developer was asked
Q. What is the difference between a tuple and a list?
Ans. 

Tuple is immutable and ordered while list is mutable and ordered.

  • Tuple uses () while list uses []

  • Tuple is faster than list for accessing elements

  • Tuple can be used as keys in dictionaries while list cannot

  • Tuple can be used in string formatting while list cannot

A Python Developer was asked
Q. Can you describe a problem that can be solved using recursion?
Ans. 

One recursion problem is to find the factorial of a number.

  • The base case is when the number is 0 or 1.

  • The recursive case is to multiply the number with the factorial of (number-1).

  • Example: factorial(5) = 5 * factorial(4) = 5 * 4 * factorial(3) = ... = 5 * 4 * 3 * 2 * 1 = 120.

Python Developer Interview Questions Asked at Other Companies

asked in Cognizant
Q1. Explain the logic of a program to reverse a given string word by ... read more
asked in Cognizant
Q2. What is the difference between a variable and an object?
asked in TCS
Q3. 1. Difference between tuple and a list? 2. What are decorators? 3 ... read more
Q4. How do you convert a .txt file to a .csv file using Python?
asked in Accenture
Q5. Write a program to print a string in reverse without using built- ... read more
A Python Developer was asked
Q. Why is Python used in real-world applications?
Ans. 

Python is used in reality due to its simplicity, versatility, and wide range of applications.

  • Python is easy to learn and read, making it a popular choice for beginners.

  • It has a large standard library and many third-party modules, allowing for rapid development.

  • Python is used in web development, data analysis, machine learning, scientific computing, and more.

  • It is cross-platform and can run on various operating sys...

A Python Developer was asked
Q. Have you heard about the init method?
Ans. 

Yes, init method is a special method in Python classes used to initialize objects.

  • The init method is called automatically when an object is created from a class.

  • It is used to set initial values for object attributes.

  • The init method always takes the 'self' parameter as the first argument.

  • Example: def __init__(self, name, age): self.name = name; self.age = age

  • The init method can also be used to perform any other set...

What people are saying about Cognizant

View All
a junior software engineer
2w
Job offer in Malaysia - legit or scam?
Hey everyone, I received a job proposal from Mindgraph for a Junior Mainframe Developer position in Malaysia (onsite). Not sure if it's a real deal. They found my resume on Naukri and the offer includes: * Experience: 3+ years on cardlink, VSAM, CICS, JCL * Location: Malaysia (Accenture client in Kuala Lumpur) * Notice: 0-60 days * Benefits: One-way ticket, 1-week stay, medical insurance, visa. Has anyone heard of Mindgraph or had a similar experience? Note : This is a permanent position with Mindgragh and you need to work with our client Accenture - Malaysia (Kaula Lumpur) & we will provide one way Air Ticket from India - Malaysia, 1 Week Accommodation, Medical Insurance and will take care of the Visa process also. Any insights would be appreciated!
Got a question about Cognizant?
Ask anonymously on communities.
A Python Developer was asked
Q. What is the difference between a variable and an object?
Ans. 

Variables are names given to memory locations while objects are instances of a class with attributes and methods.

  • Variables are used to store values while objects are used to represent real-world entities.

  • Variables can be reassigned to different values while objects have a fixed identity.

  • Variables are created when they are assigned a value while objects are created using constructors.

  • Variables can be of different d...

A Python Developer was asked
Q. Have you worked on any Python-related development projects?
Ans. 

Yes, I have worked on various python projects including web development, data analysis and automation.

  • Developed a web application using Django framework

  • Automated data extraction and analysis using pandas library

  • Created a chatbot using Python and Dialogflow API

  • Implemented machine learning algorithms for predictive analysis

  • Integrated Python scripts with other technologies like AWS and Docker

A Python Developer was asked
Q. Have you heard about pickling and non-pickling?
Ans. 

Pickling is a way to serialize Python objects, while non-pickling refers to objects that cannot be pickled.

  • Pickling is used to convert Python objects into a byte stream that can be stored or transmitted.

  • Non-pickling objects are those that cannot be serialized using the pickle module.

  • Examples of non-pickling objects include file objects, network sockets, and database connections.

  • To make an object picklable, it must...

Are these interview questions helpful?
A Python Developer was asked
Q. How would you rate your Python skills?
Ans. 

I rate myself as an experienced Python developer with strong skills in various Python libraries and frameworks.

  • I have worked on various Python projects and have a good understanding of the language syntax and concepts.

  • I am proficient in using popular Python libraries such as NumPy, Pandas, and Matplotlib for data analysis and visualization.

  • I have experience in developing web applications using Python frameworks su...

A Python Developer was asked
Q. What is decorator?why we are using decorator? Write a program for decorator?
Ans. 

A decorator is a design pattern in Python that allows modifying the behavior of a function or class without changing its source code.

  • Decorators are functions that take another function as an argument and return a new function.

  • They are used to add functionality to an existing function or class.

  • They can be used to modify the behavior of a function, such as adding logging or timing functionality.

  • They can also be used...

A Python Developer was asked
Q. What is inheritance and what are its types?
Ans. 

Inheritance is a way to create a new class by inheriting properties and methods from an existing class.

  • It allows code reusability and saves time.

  • Types of inheritance are single, multiple, multilevel, and hierarchical.

  • Single inheritance involves inheriting properties and methods from a single parent class.

  • Multiple inheritance involves inheriting properties and methods from multiple parent classes.

  • Multilevel inherit...

Cognizant Python Developer Interview Experiences

9 interviews found

Interview experience
5
Excellent
Difficulty level
Easy
Process Duration
-
Result
Selected Selected
Round 1 - Aptitude Test 

Avg aptitude questions

Round 2 - Coding Test 

2 easy coding questions

Round 3 - Technical 

(2 Questions)

  • Q1. Array question in python
  • Q2. SQL query based on condition
Interview experience
1
Bad
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Recruitment Consulltant and was interviewed in Jun 2023. There were 2 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Technical 

(2 Questions)

  • Q1. Purely basic pythons
  • Q2. Coding test writing

Interview Preparation Tips

Interview preparation tips for other job seekers - Never go cognizant because they put in bench

I applied via Recruitment Consulltant and was interviewed in May 2022. There were 2 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Technical 

(4 Questions)

  • Q1. Difference between tuple and list.
  • Ans. 

    Tuple is immutable and ordered while list is mutable and ordered.

    • Tuple uses () while list uses []

    • Tuple is faster than list for accessing elements

    • Tuple can be used as keys in dictionaries while list cannot

    • Tuple can be used in string formatting while list cannot

  • Answered by AI
  • Q2. What is decorator?why we are using decorator? Write a program for decorator?
  • Ans. 

    A decorator is a design pattern in Python that allows modifying the behavior of a function or class without changing its source code.

    • Decorators are functions that take another function as an argument and return a new function.

    • They are used to add functionality to an existing function or class.

    • They can be used to modify the behavior of a function, such as adding logging or timing functionality.

    • They can also be used to e...

  • Answered by AI
  • Q3. Give one recursion problem .
  • Q4. Find second highest number from list without using inbuilt functions

Interview Preparation Tips

Interview preparation tips for other job seekers - Be confident don't hesitate tell truth. Prepare for basic data structures and some algorithms as well

Skills evaluated in this interview

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Don’t add your photo or details such as gender, age, and address in your resume. These details do not add any value.
View all tips
Round 2 - Technical 

(1 Question)

  • Q1. Why python is used in reality
  • Ans. 

    Python is used in reality due to its simplicity, versatility, and wide range of applications.

    • Python is easy to learn and read, making it a popular choice for beginners.

    • It has a large standard library and many third-party modules, allowing for rapid development.

    • Python is used in web development, data analysis, machine learning, scientific computing, and more.

    • It is cross-platform and can run on various operating systems.

    • ...

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - All the best for your python interview with flask framework.

Skills evaluated in this interview

I applied via Naukri.com and was interviewed in Apr 2022. There were 3 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Properly align and format text in your resume. A recruiter will have to spend more time reading poorly aligned text, leading to high chances of rejection.
View all tips
Round 2 - Technical 

(1 Question)

  • Q1. Python fundamental need to be strong
Round 3 - HR 

(1 Question)

  • Q1. General - Related to salary, notice period, etc

Interview Preparation Tips

Interview preparation tips for other job seekers - Simple, just make sure your basics are clear. Explain with example

Python Developer Interview Questions & Answers

user image Ajay Kumar Shaw

posted on 1 Sep 2021

I applied via Naukri.com and was interviewed in Mar 2021. There were 3 interview rounds.

Interview Questionnaire 

10 Questions

  • Q1. Give your introduction.
  • Q2. What was you work/role in current company?
  • Q3. Have you done anything on python related developments.
  • Q4. What is the difference between variable and object?
  • Q5. Have you heard about init method?
  • Ans. 

    Yes, init method is a special method in Python classes used to initialize objects.

    • The init method is called automatically when an object is created from a class.

    • It is used to set initial values for object attributes.

    • The init method always takes the 'self' parameter as the first argument.

    • Example: def __init__(self, name, age): self.name = name; self.age = age

    • The init method can also be used to perform any other setup or...

  • Answered by AI
  • Q6. What is inheritance and what are its types?
  • Ans. 

    Inheritance is a way to create a new class by inheriting properties and methods from an existing class.

    • It allows code reusability and saves time.

    • Types of inheritance are single, multiple, multilevel, and hierarchical.

    • Single inheritance involves inheriting properties and methods from a single parent class.

    • Multiple inheritance involves inheriting properties and methods from multiple parent classes.

    • Multilevel inheritance ...

  • Answered by AI
  • Q7. Have you heard about pickling and non pickling?
  • Q8. What models you made in your ML projects(in my intro i told that I was working on datasets and making ML models)?
  • Q9. Why you want to relocate to Bangalore?
  • Q10. Tell me the logic of program to reverse a given string word by word without using any built in function.
  • Ans. 

    The logic of the program is to reverse a given string word by word without using any built-in function.

    • Split the string into an array of words using whitespace as the delimiter.

    • Iterate through the array of words in reverse order.

    • Append each word to a new string, separated by a space.

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - For virtual interviews, interviewer may ask you to share screen and will give any code and ask for output, make give any coding problem to be done in notepad, may also stick to theoretical questions only as in my case, so be well prepared with basic terminologies, syntax, concepts etc

Skills evaluated in this interview

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Aptitude Test 

(1 Question)

  • Q1. Yes also than python and machine learning based

Interview Preparation Tips

Interview preparation tips for other job seekers - Yes, I am interested , and we needed

I applied via LinkedIn and was interviewed in Feb 2022. There was 1 interview round.

Round 1 - HR 

(1 Question)

  • Q1. When did you content an interview

Interview Preparation Tips

Topics to prepare for Cognizant Python Developer interview:
  • Python Full Stack
Interview preparation tips for other job seekers - Respected sir, I'm a python Developer .....I'm recently completed my post graduation in 2021

I applied via Campus Placement and was interviewed in Jun 2021. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. How do you rate yourself in python

Interview Preparation Tips

Interview preparation tips for other job seekers - Say with your comfort with python don't go with 8 9 10

Skills evaluated in this interview

Interview questions from similar companies

I applied via LinkedIn and was interviewed in Nov 2021. There was 1 interview round.

Interview Questionnaire 

1 Question

  • Q1. Generics in Java
  • Ans. 

    Generics in Java allow for type safety and reusability of code.

    • Generics allow for the creation of classes, interfaces, and methods that can work with any data type.

    • They provide compile-time type safety, preventing runtime errors.

    • Examples include ArrayList, HashMap, and Comparable.

    • Wildcards can be used to allow for flexibility in generic types.

    • Generics can improve code readability and reduce the need for casting.

    • Ge...

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare thoroughly with basics and coding

Skills evaluated in this interview

Cognizant Interview FAQs

How many rounds are there in Cognizant Python Developer interview?
Cognizant interview process usually has 2-3 rounds. The most common rounds in the Cognizant interview process are Resume Shortlist, Technical and Aptitude Test.
How to prepare for Cognizant Python Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Cognizant. The most common topics and skills that interviewers at Cognizant expect are Python, Django, Python Development, SQL and Web Development.
What are the top questions asked in Cognizant Python Developer interview?

Some of the top questions asked at the Cognizant Python Developer interview -

  1. Tell me the logic of program to reverse a given string word by word without usi...read more
  2. What is the difference between variable and obje...read more
  3. Have you done anything on python related developmen...read more

Tell us how to improve this page.

Overall Interview Experience Rating

3/5

based on 2 interview experiences

Difficulty level

Easy 50%
Moderate 50%

Duration

Less than 2 weeks 100%
View more
Cognizant Python Developer Salary
based on 228 salaries
₹3.6 L/yr - ₹14.4 L/yr
43% more than the average Python Developer Salary in India
View more details

Cognizant Python Developer Reviews and Ratings

based on 13 reviews

3.2/5

Rating in categories

3.0

Skill development

3.9

Work-life balance

3.5

Salary

2.6

Job security

3.8

Company culture

3.0

Promotions

3.3

Work satisfaction

Explore 13 Reviews and Ratings
Python Developer with AWS and Go lang

Pune,

Chennai

+1

5-10 Yrs

Not Disclosed

Cognizant Hiring Python Developer For Hyderabad Location!!!

Hyderabad / Secunderabad

10-18 Yrs

Not Disclosed

Explore more jobs
Associate
73.1k salaries
unlock blur

₹5.3 L/yr - ₹12.5 L/yr

Programmer Analyst
56.1k salaries
unlock blur

₹3.5 L/yr - ₹7.3 L/yr

Senior Associate
52.9k salaries
unlock blur

₹10.5 L/yr - ₹23.4 L/yr

Senior Processing Executive
29.8k salaries
unlock blur

₹2.2 L/yr - ₹6.5 L/yr

Technical Lead
19k salaries
unlock blur

₹6 L/yr - ₹21.3 L/yr

Explore more salaries
Compare Cognizant with

TCS

3.6
Compare

Infosys

3.6
Compare

Wipro

3.7
Compare

Accenture

3.7
Compare
write
Share an Interview