Call Us Now!
+91 9884412301 | +91 9600112302
info@credosystemz.com
Credo SystemzCredo Systemz
  • Courses
    • TRENDING TECHNOLOGIES TRAINING
    • RPA TRAINING
    • CLOUD COMPUTING TRAINING
    • BIG DATA TRAINING
    • WEB DEVELOPMENT TRAINING
    • MOBILE APPLICATION TRAINING
    • SOFTWARE TESTING TRAINING
    • MICROSOFT TECHNOLOGIES TRAINING
    • JAVA TRAINING
    • PROJECT MANAGEMENT TRAINING
    • DATA WAREHOUSING TRAINING
    • ORACLE TRAINING
    • DATABASE DEVELOPER TRAINING
    • OTHER TRAININGS
    • TRENDING TECHNOLOGIES
      Python Training Data Science Training Angular Training React JS Training ORACLE PRIMAVERA TRAINING Machine Learning Training Hadoop Training Amazon Web Services Training DevOps Training Azure Training PySpark Training MEAN Stack Training
    • RPA TRAINING
      Blue Prism Training UiPath Training Automation Anywhere
    • CLOUD COMPUTING
      Amazon Web Services Training AWS with Devops Training Azure Training AZ 104 Azure Administrator AZ 204 Azure Developer AZ 300 Azure Architect AZ 303 Azure Architect AZ 400 Azure Devops Google Cloud Platform Salesforce Training OpenNebula Training OpenStack Training OpenSpan Training
    • BIG DATA TRAINING
      Hadoop Training Big Data Analytics Training Spark Training
    • WEB DEVELOPMENT
      Angular Training Node JS Training React JS Training React Native Training Ionic Framework Training MEAN Stack Training PHP Training JavaScript Training CoffeeScript Training Less JS Training Graphics Design Training HTML Training CSS Training
    • MOBILE APPLICATION
      Android Training iOS Training iOS Swift Training Kotlin Training Flutter Dart Training
    • SOFTWARE TESTING
      Manual Testing Training UFT / QTP Training Selenium Training API Testing Training Selenium with Python Training Perfecto Mobile Testing Training ETL Testing Training JMeter Training LoadRunner Training Performance Engineering Big Data Testing Training Protractor Testing Training
    • MICROSOFT TECHNOLOGIES
      Dot Net Training MVC Framework ASP.NET MVC with Angular SharePoint Training Advanced Excel Training Excel Macro Training Azure Training Azure Infrastructure Solutions AZ 300 Azure Architect
    • JAVA TRAINING
      Core Java Training Java 8 Training Java J2EE Training Advanced Java Training Hibernate Training Spring Training Struts Training
    • PROJECT MANAGEMENT
      Oracle Primavera Training Primavera P6 Online Training Microsoft Project Training PMP Training ITIL Training Prince2 Training Scrum Master Training Business Analytics Training
    • DATA WAREHOUSING
      Tableau Training Power BI Training Qlikview Training Qlik Sense Training Informatica Training Microstrategy Training Teradata Training Cognos Training SAS Training
    • ORACLE TRAINING
      Oracle PL/SQL Training Oracle DBA Training Oracle Apps Technical Training Oracle Apps SCM Training Oracle Apps HRMS Training Oracle Apps Finance Training Oracle RAC Training PeopleSoft HCM Training PeopleSoft Finance Training
    • DATABASE DEVELOPER
      MongoDB Training Apache Cassandra Training Sybase Training Informix Training Performance Tuning Training
    • OTHER TRAININGS
      Ethical Hacking Training C C++ Training Unix Shell Scripting Training Tensorflow Training Data Modeling Training Workday Training PEGA Training Digital Marketing Training CCNA Training Arduino Training Elm Training Go Programming Training Rust Programming Training CYBER SECURITY TRAINING BIZTALK SERVER TRAINING Spoken English Course
  • Fresher Courses
    • ANGULAR TRAINING
    • REACT JS TRAINING
    • PYTHON TRAINING
    • JAVA TRAINING
    • SELENIUM TRAINING
    • FULLSTACK TRAINING
  • Placements
    • Career Guidance
      • Job Opportunities
      • Interview Questions
      • Resume Building
    • RECENT PLACEMENTS
  • About Us
    • Online Training
    • Corporate Training
    • Events
    • Reviews
      • Video Reviews
    • Become an instructor
  • Training
    • Trending Technologies Training
    • RPA TRAINING in Chennai
    • Cloud Computing Training
    • Big Data Hadoop Training in Chennai
    • Web Development Training
    • Mobile Application Training
    • Software Testing Training
    • Microsoft Technologies Training
    • Java Training
    • Project Management Training
    • Data Warehousing Training
    • Oracle Training
    • Database Developer Training
    • Other Training
  • Contact Us
  • Courses
    • TRENDING TECHNOLOGIES TRAINING
    • RPA TRAINING
    • CLOUD COMPUTING TRAINING
    • BIG DATA TRAINING
    • WEB DEVELOPMENT TRAINING
    • MOBILE APPLICATION TRAINING
    • SOFTWARE TESTING TRAINING
    • MICROSOFT TECHNOLOGIES TRAINING
    • JAVA TRAINING
    • PROJECT MANAGEMENT TRAINING
    • DATA WAREHOUSING TRAINING
    • ORACLE TRAINING
    • DATABASE DEVELOPER TRAINING
    • OTHER TRAININGS
    • TRENDING TECHNOLOGIES
      Python Training Data Science Training Angular Training React JS Training ORACLE PRIMAVERA TRAINING Machine Learning Training Hadoop Training Amazon Web Services Training DevOps Training Azure Training PySpark Training MEAN Stack Training
    • RPA TRAINING
      Blue Prism Training UiPath Training Automation Anywhere
    • CLOUD COMPUTING
      Amazon Web Services Training AWS with Devops Training Azure Training AZ 104 Azure Administrator AZ 204 Azure Developer AZ 300 Azure Architect AZ 303 Azure Architect AZ 400 Azure Devops Google Cloud Platform Salesforce Training OpenNebula Training OpenStack Training OpenSpan Training
    • BIG DATA TRAINING
      Hadoop Training Big Data Analytics Training Spark Training
    • WEB DEVELOPMENT
      Angular Training Node JS Training React JS Training React Native Training Ionic Framework Training MEAN Stack Training PHP Training JavaScript Training CoffeeScript Training Less JS Training Graphics Design Training HTML Training CSS Training
    • MOBILE APPLICATION
      Android Training iOS Training iOS Swift Training Kotlin Training Flutter Dart Training
    • SOFTWARE TESTING
      Manual Testing Training UFT / QTP Training Selenium Training API Testing Training Selenium with Python Training Perfecto Mobile Testing Training ETL Testing Training JMeter Training LoadRunner Training Performance Engineering Big Data Testing Training Protractor Testing Training
    • MICROSOFT TECHNOLOGIES
      Dot Net Training MVC Framework ASP.NET MVC with Angular SharePoint Training Advanced Excel Training Excel Macro Training Azure Training Azure Infrastructure Solutions AZ 300 Azure Architect
    • JAVA TRAINING
      Core Java Training Java 8 Training Java J2EE Training Advanced Java Training Hibernate Training Spring Training Struts Training
    • PROJECT MANAGEMENT
      Oracle Primavera Training Primavera P6 Online Training Microsoft Project Training PMP Training ITIL Training Prince2 Training Scrum Master Training Business Analytics Training
    • DATA WAREHOUSING
      Tableau Training Power BI Training Qlikview Training Qlik Sense Training Informatica Training Microstrategy Training Teradata Training Cognos Training SAS Training
    • ORACLE TRAINING
      Oracle PL/SQL Training Oracle DBA Training Oracle Apps Technical Training Oracle Apps SCM Training Oracle Apps HRMS Training Oracle Apps Finance Training Oracle RAC Training PeopleSoft HCM Training PeopleSoft Finance Training
    • DATABASE DEVELOPER
      MongoDB Training Apache Cassandra Training Sybase Training Informix Training Performance Tuning Training
    • OTHER TRAININGS
      Ethical Hacking Training C C++ Training Unix Shell Scripting Training Tensorflow Training Data Modeling Training Workday Training PEGA Training Digital Marketing Training CCNA Training Arduino Training Elm Training Go Programming Training Rust Programming Training CYBER SECURITY TRAINING BIZTALK SERVER TRAINING Spoken English Course
  • Fresher Courses
    • ANGULAR TRAINING
    • REACT JS TRAINING
    • PYTHON TRAINING
    • JAVA TRAINING
    • SELENIUM TRAINING
    • FULLSTACK TRAINING
  • Placements
    • Career Guidance
      • Job Opportunities
      • Interview Questions
      • Resume Building
    • RECENT PLACEMENTS
  • About Us
    • Online Training
    • Corporate Training
    • Events
    • Reviews
      • Video Reviews
    • Become an instructor
  • Training
    • Trending Technologies Training
    • RPA TRAINING in Chennai
    • Cloud Computing Training
    • Big Data Hadoop Training in Chennai
    • Web Development Training
    • Mobile Application Training
    • Software Testing Training
    • Microsoft Technologies Training
    • Java Training
    • Project Management Training
    • Data Warehousing Training
    • Oracle Training
    • Database Developer Training
    • Other Training
  • Contact Us

Tech Mahindra Python Interview Questions

  • Home
  • Tech Mahindra Python Interview Questions

TECH MAHINDRA – Python Interview Questions

Here is the list of Python Interview Questions which are recently asked in Tech Mahindra company. These questions are included for both Freshers and Experienced professionals.


1. Compare between Java and Python.

Java is a statically typed and compiled language, and Python is a dynamically typed and interpreted language. This single difference makes Java faster at runtime and easier to debug, but Python is easier to use and easier to read.

2. What is Python?

Python is a high-level, interpreted, interactive and object-oriented scripting language that is used to create user interface applications for web development (server side), software development, mathematics, operation and so on.

Python is a general-purpose interpreted, interactive, object-oriented programming language.

3. What are the key features of Python?

  • Easy To Learn
  • High-Level Programming Language
  • Portable and Expressive
  • Object-Oriented
  • Free and Open Sources
  • Interpreted

4. What is the purpose of PYTHONPATH environment variable?

PYTHONPATH is an environment variable which you can set to add additional directories where python will look for modules and packages. For most installations, you should not set these variables since they are not needed for Python to run.

Python knows where to find its standard library.

5. Which data types are supported in Python?

The basic data types in Python are Integers, Floating-Point Numbers, Complex Numbers, Strings, Boolean Type, Built-In Functions like Math. Type Conversion. Iterables, Composite Data Type like Classes, Attributes, and Inheritance. Input/Output.

Interview Questions based on Experience - Click here - Python Interview Questions and Answers

6. How is memory managed in Python?

Memory management in Python involves a private heap containing all Python objects and data structures. The management of this private heap is ensured internally by the Python memory manager.

The Python memory manager has different components which deal with various dynamic storage management aspects, like sharing, segmentation, reallocation or caching

7. Explain Inheritance in Python with an example.

Inheritance is a powerful feature in object oriented programming. It refers to defining a new class with little or no modification to an existing class.

The new class is called derived (or child) class and the one from which it inherits is called the base (or parent) class.

8. What are the two major loop statements?

The group of statements being executed repeatedly is called a loop. There are two loop statements in Python: for and while.

9. What type of language is Python? Programming or Scripting?

Python is scripting, general-purpose, high-level, and interpreted programming language. It also provides the object-oriented programming approach.,

10. Define generators in Python?

A Python generator is a function that produces a sequence of results. It works by maintaining its local state, so that the function can resume again exactly where it left off when called subsequent times.

Thus, you can think of a generator as something like a powerful iterator.

11. How do we reverse a list in Python?

Reversing a list in-place with the list. reverse() method. Using the “ [::-1] ” list slicing trick to create a reversed copy. Creating a reverse iterator with the reversed() built-in function.

12. Write a program to check whether the given number is prime or not?


# To take input from the user
num = int(input("Enter a number: "))
# prime numbers are greater than 1
if num > 1:
   # check for factors
   for i in range(2,num):
       if (num % i) == 0:
           print(num,"is not a prime number")
           print(i,"times",num//i,"is",num)
           break
   else:
       print(num,"is a prime number")
  # if input number is less than
# or equal to 1, it is not prime
else:
   print(num,"is not a prime number")

13.What is a dictionary in Python?

Python dictionary is an unordered collection of key-value pairs. It is mutable and can contain mixed types. The keys in a dictionary must be immutable objects like strings or numbers. They must also be unique within a dictionary.

14. Define pickling and unpickling in Python.

Pickling” is the process whereby a Python object hierarchy is converted into a byte stream, and “unpickling” is the inverse operation, whereby a byte stream (from a binary file or bytes-like object) is converted back into an object hierarchy.

15. What is a map function in Python?

Python's map() is a built-in function that allows you to process and transform all the items in an iterable without using an explicit for loop, a technique commonly known as mapping.

16. What is a Python module?

Module can be defined as functions, classes, and variables. Modules help you to organize Python code logically. By grouping related code into modules, you can make Python code more easy-to-use and understand.

17. Is indentation optional in Python?

It is required for indicating what block of code a statement belongs to. For example, j=1 and while(j<=5): is not indented, and so it is not within while block. So, Python code structures by indentation. Python uses 4 spaces as indentation by default.

18. How are Python arrays and Python lists different from each other?

Lists and arrays are used in Python to store data(any data type- strings, integers etc), both can be indexed and iterated also. Arrays need to be declared whereas lists do not need declaration because they are a part of Python's syntax. This is the reason lists are more often used than arrays.

19. What is __init__ in Python?

"__init__" is a reseved method in python classes. It is known as a constructor in object oriented concepts. This method called when an object is created from the class and it allow the class to initialize the attributes of a class.

20. Write Python code to check the given sequence is a palindrome or not?


Python program to check the given number is a palindrome or not
number=int(input("Enter any number :"))
#store a copy of this number
temp=number
#calculate reverse of this number
reverse_num=0
while(number>0):
extract last digit of this number
digit=number%10
#append this digit in reveresed number
reverse_num=reverse_num*10+digit
#floor divide the number leave out the last digit from number
number=number//10
#compare reverse to original number
if(temp==reverse_num):
print("The number is palindrome!")
else:
print("Not a palindrome!")

21. What is the use of manage.py?

Every Django project starts with a manage.py file in its root. It's a convenience script that allows you to run administrative tasks like Django's including django-admin.

22. How can I practice code?

To Practice Python effectively you have to Code Every day by write yourself in a Interactive way .Make It Collaborative With help of Others Learners. Build something using all the python concepts, techniques and modules.

23. Does multiple inheritances is supported in Python?

When a child class inherits from multiple parent classes, it is called multiple inheritance. Unlike Java and like C++, Python supports multiple inheritance.

24. How can we create an empty class in Python?

In Python, to write an empty class pass statement is used. pass is a special statement in Python that does nothing. It only works as a dummy statement. However, objects of an empty class can also be created.

Book a Free Mock Interviews and Test your Python Knowledge with our Experts

TOP MNC's PYTHON INTERVIEW QUESTIONS & ANSWERS

Here we listed all Python Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Python.

Accenture
IBM
Wipro
Contus
L & T
TCS
Capgemini
HCL
Fidelity
FIS
Infosys
Cognizant
DXC Technology
Tech Mahindra
Dell

Related Blogs

Top Python Libraries
To Learn In 2023

Python is used seamlessly for the trending technologies like Artificial intelligence,web development, scripting, game development,

Top Python Development
Trend In 2023

Python Programming which is currently a trending programming language in the era of information technology,

Why Python Is So
Hot Right Now

Knowledge drop!! Python programming which is one of the high level interpreted general purpose programming language

To become a Python Certified professional and join in your dream company, Enroll now for our Best Python Training. We help you to crack any level of Python Interviews and We offering Python Training with 100% Placements.

Related Tags

Python Training in Chennai | Azure Certification Training in Chennai | Dot Net Training in Chennai | Selenium Course in Chennai | DevOps Training in Chennai | Data Science Online Training | AWS Certification Training in Chennai | Angular Course in Chennai | React JS Training in Chennai | GCP Training in Chennai | Java Online Training with Placements

other top mnc Python Interview Q&A

  • TCS
  • Infosys
  • IBM
  • Capgemini
  • Cognizant
  • Wipro
  • HCL
  • DXC Technology
  • Contus
  • Fidelity
  • Tech Mahindra
  • L & T
  • FIS
  • Dell
  • Accenture

Python Latest News

Python Growth

According to a Forbes report on ‘technical skills with huge demand’, Python is listed top on the list, with a growth rate of 456% last year.

Python Annual Salary

The Average salary for Python Developer is 4, 42,713 per year in Indian based on 770 salaries submitted to Glassdoor by Python Developer employees.

INDIA LOCATIONS

New #30,Old #16A,
Rajalakshmi Nagar, Velachery,
Chennai - 600 042.
Mobile: +91 9884412301

Plot No.8, Vinayaga Avenue,
Rajiv Gandhi Salai, Okkiampettai(OMR),
Chennai – 600 097.
Mobile: +91 9600112302

Refund/Cancellation Policy

INTERNATIONAL LOCATIONS

USA
Houchin Drive, Franklin, TN -37064
Tennessee
Email: info@credosystemz.com
Web: www.credosystemz.com
Chat With Us

UAE
Sima Electronic Building,
LLH Opposite,
Electra Street – Abu Dhabi
Email: info@credosystemz.com
Web: www.credosystemz.com
Chat With Us

Follow us on





TRENDING COURSES

  • Python Training in Chennai
  • Data Science Training in Chennai
  • Big Data Hadoop Training in Chennai
  • Machine Learning Training in Chennai
  • Selenium Training in Chennai
  • Angular Training in Chennai
  • Oracle Primavera P6 Online Training
  • Mean Stack Training in Chennai
  • DevOps Training in Chennai
  • Microsoft Azure Training in Chennai
  • GCP Training in Chennai

Copyright 2022 CREDO SYSTEMZ | All Rights Reserved.