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

Accenture Python Interview Questions

  • Home
  • Accenture Python Interview Questions

Accenture – Python Interview Questions

Here is the list of Python Interview Questions which are recently asked in Accenture company. These questions are included for both Freshers and Experienced professionals. Our Python Training has Answered all the below Questions.


1. What is Python?

Python is a programming language that is used for web development(serverside) , software development , mathematics operation and so on. Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.

Python source code is also available under the GNU General Public License (GPL). This tutorial gives enough understanding on Python programming language.

2. Why Python?

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.

Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).

Python can be treated in a procedural way, an object-oriented way or a functional way.

3. In a Python Application, How to find Bugs or perform Static Analysis?

Pychecker and Pylint are the static analysis tools that help to find bugs in python. Pychecker is an opensource tool for static analysis that detects the bugs from source code and warns about the style and complexity of the bug.

Pylint is highly configurable and it acts like special programs to control warnings and errors, it is an extensive configuration file Pylint is also an opensource tool for static code analysis it looks for programming errors and is used for coding standard.

4. What are the applications of Python?

  • Web and Internet Development
  • Scientific and Numeric
  • Education
  • Desktop GUI’s
  • Software Development
  • Business Application

5. What are the advantages of Python?

  • Easy to Read, Learn and Write - Python is really easy to pick up and learn, that is why a lot of people recommend Python to beginners
  • Improved Productivity - Due to the simplicity of Python, developers can focus on solving the problem.
  • Interpreted Language - Python is an interpreted language which means that Python directly executes the code line by line.
  • Dynamically Typed - It automatically assigns the data type during execution.
  • Free and Open-Source - Python comes under the OSI approved open-source license.
  • Vast Libraries Support - The standard library of Python is huge, you can find almost all the functions needed for your task
  • Portability - You only write once and run it anywhere.

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

6. When is Python Decorator used?

A decorator is a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure. Decorators are usually called before the definition of a function you want to decorate.

Creating Decorators
	
def uppercase_decorator(function): 
def wrapper():
func = function()
make_uppercase = func.upper()
return make_uppercase
return wrapper
		 

7. What is PEP 8?

PEP stands for Python Enhancement Proposal.

PEP8 is a document that provides guidelines and best practices on how to write Python code.

The primary focus of PEP 8 is to improve the readability and consistency of Python code.

8. How does Python Handle the Memory Management?

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, preallocation or caching.

9. What do you mean by Python literals?

A literal is a succinct and easily visible way to write a value. Literals represent the possible choices in primitive types for that language. Some of the choices of types of literals are often integers, floating point, Booleans and character strings.

  • String literals :: "halo" , '12345'
  • Int literals :: 0,1,2,-1,-2
  • Long literals :: 89675L
  • Float literals :: 3.14
  • Complex literals :: 12j
  • Boolean literals :: True or False
  • Special literals :: None
  • Unicode literals :: u"hello"
  • List literals :: [], [5,6,7]
  • Tuple literals :: (), (9,),(8,9,0)
  • Dict literals :: {}, {'x':1}
  • Set literals :: {8,9,10}

10. What is the output of print str if str = ‘Hello World!’?

It will print complete string. Output would be Hello World!.

11. Explain Python Functions?

In Python, a function is a group of related statements that performs a specific task. Functions help break our program into smaller and modular chunks. As our program grows larger and larger, functions make it more organized and manageable.

Furthermore, it avoids repetition and makes the code reusable.

12. What is zip() function in Python?

The zip() function returns a zip object, which is an iterator of tuples where the first item in each passed iterator is paired together, and then the second item in each passed iterator are paired together etc.

If the passed iterators have different lengths, the iterator with the least items decides the length of the new iterator.

Syntax

zip(iterator1, iterator2, iterator3 ...)

13. What is Python's parameter passing mechanism?

All parameters (arguments) in the Python language are passed by reference. It means if you change what a parameter refers to within a function, the change also reflects back in the calling function.

Example

student={'Archana':28,'krishna':25,'Ramesh':32,'vineeth':25}
def test(student):
new={'alok':30,'Nevadan':28}
student.update(new)
print("Inside the function",student)
return
test(student)
print("outside the function:",student)

Output

Inside the function {'Archana': 28, 'krishna': 25, 'Ramesh': 32, 'vineeth': 25, 'alok': 30, 'Nevadan': 28}

outside the function: {'Archana': 28, 'krishna': 25, 'Ramesh': 32, 'vineeth': 25, 'alok': 30, 'Nevadan': 28}

14. Explain the different ways to write a function using call by reference?

Python in different ways for write a function that known as “call by reference”. In this event , pass the argument as whole numbers, string, or tuples of the function. By “call by value” because cannot change the value of the immutable objects passed to the function.

#call by value;

String = “morning”;
def data(string):
	string = “Good Morning”
	print(“Inside the Function”,string)
data(string)
print(“Outside the Function”,string)

Output

Inside Function: Good Morning

Outside Function: Morning

#call by Reference

def data(string):
string = “Good Morning”
print(“Inside the Function”,string)
data(string)
print(“Outside the Function”,string)

Output

Inside Function: Good Morning

Outside Function: Good Morning

15. How to overload constructors or methods in Python?

init__ () is a first method defined in a class. when an instance of a class is created, python calls __init__() to initialize the attribute of the object.

Following example demonstrate further:

class Employee:

def __init__(self, name, empCode,pay):
self.name=name
self.empCode=empCode
self.pay=pay
e1 = Employee("Sarah",99,30000.00)
e2 = Employee("Asrar",100,60000.00)
print("Employee Details:")
print(" Name:",e1.name,"Code:", e1.empCode,"Pay:", e1.pay)
print(" Name:",e2.name,"Code:", e2.empCode,"Pay:", e2.pay)
Output

Employee Details:

(' Name:', 'Sarah', 'Code:', 99, 'Pay:', 30000.0)

(' Name:', 'Asrar', 'Code:', 100, 'Pay:', 60000.0)

16. What is the difference between remove() function and del statement?

remove() delete the matching element/object whereas del and pop removes the element at a specific index.

remove : remove() removes the first matching value or object, not a specific indexing. lets say list.remove(value)

Example
list=[10,20,30,40]
list.remove(30)
print(list)

Output

[10, 20, 40]

del : del removes the item at a specific index. lets say del list[index]

Example

list = [10,20,30,40,55]
del list[1]
print(list)
Output

[10, 30, 40, 55]

17. What is swapcase() function in the Python?

Python string swapcase() function is basically used to converts case of each character of the input string.

Example:


input_str = “Amazon Prime is a great OTT Platform
		input_str.swapcase()
		aMAZON pRIME IS A GREAT ott pLATFORM.

18. What is the output of print tuple if tuple = ( ‘abcd’, 786 , 2.23, ‘john’, 70.2 )?

It will print complete tuple. Output would be (‘abcd’, 786, 2.23, ‘john’, 70.200000000000003).

19. How to remove whitespaces from a string in Python?

It will print complete tuple. Output would be (‘abcd’, 786, 2.23, ‘john’, 70.200000000000003).

The strip() function basically removes the leading(front) and the trailing(end) spaces of the string.

Key points:

strip(): This function removes the leading(front) and the trailing(end) spaces from an array including the tabs(\t).

lstrip(): This function removes spaces from the left end of the string.

rstrip(): This function removes spaces from the right end of the string.

Example:


string = '   Safa Mulani is a student of Engineering Discipline.    '
print(f'String =\'{string}\'')
print(f'After Removing Leading Whitespaces String =\'{string.lstrip()}\'')
print(f'After Removing Trailing Whitespaces String =\'{string.rstrip()}\'')
print(f'After Trimming Whitespaces String =\'{string.strip()}\'')

20. List some of the features of Python.

  • Easy to Code
  • Easy to Read
  • Expressive
  • Free and Open-Source
  • Python is a high-level language
  • Portable
  • Object-Oriented
  • Embeddable
  • Large Standard Library
  • Dynamically Typed
  • GUI Programming

21. What is NumPy and How is it Better than a List in Python?

Numpy is the core library in Python. It provides a high-performance multidimensional array object, and tools are working with that arrays. A numpy array is a grid of values, all of the esame type, and is indexed by a tuple of nonnegative integers.

List is the core library in Python. A list is the Python equivalent of an array, but is resizeable and can contain elements of different types

22. How to remove leading whitespaces from a string in the Python?

The strip() function basically removes the leading(front) and the trailing(end) spaces of the string.

Example:

String = '             Raj Kumar is a student         '
Print  (f' String =\'{string}\'')
print (f' After Trimming Whitespaces String =\'{string.strip()}\'')

23. Is python a case sensitive language?

Python is case-sensitive language i.e name and NAME are two different variables.

Python object-oriented language (everything in Python is an object: numbers, dictionaries, user-defined, and built-in classes). Python has no mandatory operator completion characters, block boundaries are defined by indents.

24. Why do we use join() function in Python?

The join() method joins elements and returns the joined string. The join() methods combines every element of the sequence in both string and array.

String join() function:

firstname = "Bugs"
lastname = "Bunny"
# define our sequence                                                    
sequence = (firstname,lastname)
# join into new string                                                   
name = " ".join(sequence)
print(name)          
OUTPUT : Bugs Bunny

Array join() function:

words = ["How","are","you","doing","?"]
sentence = ' '.join(words)
print(sentence)	
OUTPUT:

How are you doing ?

25. Give an example of shuffle() method?

Python number method shuffle() randomizes the items of a list in place.

import random

list = [20, 16, 10, 5];
random.shuffle(list)
print "Reshuffled list : ",  list
random.shuffle(list)
print "Reshuffled list : ",  list
Reshuffled list :  [16, 5, 10, 20]
Reshuffled list :  [16, 5, 20, 10]

26. What is the use of break statement?

The break is used when some external condition is triggered requiring exit from a loop. The break statement can be used in both while , for loops and also switch case.

If you are using nested loops, the break statement terminate the execution of the nearest loop and start executing the next line of code after the scope.

Syntax

The syntax for a break statement in Python is as follows − break

Flow Diagram
Flowdiagram

27. What are the supported data types in Python?

  • Numbers
  • Sequence Type
  • Boolean
  • Set
  • Dictionary

Python Data Types

28. What is tuple in Python?

Tuple is built in data type used in python

Tuple is used to store collection of items in single variable.

Tuple is a collection that is ordered and unchangeable.

29. Which are the file related libraries/modules in Python?

Modules are used to file containing Python statements and definitions.

In this module provides code reusability.

Define our most used functions in a module and import it, instead of copying their definitions into different programs

30. What are the Different ways to Create an empty NumPy Array in Python?

There are three different ways to create Numpy arrays:
  • Using Numpy functions.
  • Conversion from other Python structures like lists.
  • Using special library functions.

31. What are the different file processing modes supported by Python?

File is a information that store in the computer storage. Python provides manipulating the files.
  • Python is supported by two types of the file.
  • text file stored by form of the text file
  • Binary data that stores binary file (computer readable format)
Python has a built in function open() to open a file.
  • r - open a file for reading. (default)
  • w - Open a file for writing. If file already exists its data will be cleared before opening. Otherwise new file will be created
  • x - open for exclusive creation, failing if the file already exists
  • a - open for writing, appending to the end of the file if it exists
  • b - binary mode
  • t - text mode (default)
  • +r - Open a file for updating (reading and writing)

32. Explain the Difference between a List and Tuple?

ListTuple
It is mutableIt is immutable
The implication of iterations is time-consuming in the list.Implications of iterations are much faster in tuples.
Operations like insertion and deletion are better performed.Elements can be accessed better.
Consumes more memory.Consumes less memory.
Many built-in methods are available.Does not have many built-in methods.
Unexpected errors and changes can easily occur in lists.Unexpected errors and changes rarely occur in tuples.


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.