Table of Contents
Will you be pursuing a career with PwC?, it’s critical to familiarise yourself with interview questions that may come up during the hiring process. You can improve your chances of passing the interview and getting your ideal job by being ready for these questions. We have compiled a list of the most crucial questions and answers that you just cannot overlook, with the assistance of industry professionals. The goal of this post is to help you ace the PwC interview by providing advice and guidance throughout the selection process, in addition to the question and answer portion.
Experience the power of our python programming course with a free demo – enroll now!
Introduction
PwC is considered one of the Big Four accounting firms, alongside Deloitte, EY, and KPMG. It is the second-largest business services network in the world. PwC employs more than 295,000 people in 742 locations across 156 countries. To fulfil the requirements of businesses and clients, it offers advice, tax, and assurance services. PwC has been ranked among the top accounting companies globally for the past seven years by Vault Accounting 50.
Why Pwc?
With more than 295,000 workers and a global presence across 156 countries as of June 30, 2021, PricewaterhouseCooper Pvt Ltd (PwC Pvt Ltd) is a prominent transnational professional service network of firms that operates as partnerships under the PwC name. Quality assurance, tax, and advisory services are provided, assisting businesses and individuals in creating the value they seek. With a staggering US $45 billion in revenue by June 30, 2021, PwC Pvt Ltd will have proviservices to 84% of Global Fortune 500 firms.
Additionally, PwC created a number of enterprise tools in the areas of productivity, HR, legal, tax, and compliance, as well as personnel management. By upholding these five values, PwC states that its mission is “to build trust in society and solve important problems.”
- Be Honest in Your Actions
- Make an impact
- Care
- Collaborate
- Imagine the impossible.
Career Options for Python in Pwc
1: Which of the following data types is immutable in Python?
- The language’s major focus and primary purpose is code readability. Additionally, there is a sizable and active Python community.
- Developers can always get in touch with one another for support. Python is a versatile language that will eventually help us. Python will continue to expand in line with the AI concept’s growth.
- In addition, Python has many libraries and APIs that make it possible to perform a variety of non-development tasks, like data manipulation, analysis, and visualisation.
- It makes logical that in addition to the developer community, specialists in other fields like data science and analytics also highly regard Python.
Pwc interview Process
1. Interview Process
- Aptitude
- Technical
- Partner Round
- HR
2. Interview Rounds
1. Aptitude Round:
- Verbal Ability: This section assesses the candidate’s command of the English language. Questions in this section typically involve selecting the proper synonym and antonym, adding the correct preposition to the gaps, and other tasks. There might also be questions that are paragraph-based, where you are given a text and asked to answer three or four questions about it.
- Numerical Ability: This section assesses the candidate’s level of mathematical competency. Mathematical subjects including simple and compound interest, clocks, permutations and combinations, profit and loss, speed and distance, and probability are commonly covered in this section’s questions.
- Reasoning Ability: This section assesses the candidate’s ability to reason logically. The questions in this part usually require you to find the next phrase in a given sequence, match the pattern, find the odd one out, and so on.
2. Technical Round:
- Depending on how well they perform in the aptitude round, candidates will move on to the technical stage. Even for a technology consultant position, there are multiple separate profiles, including SAP, Microsoft ERP, Oracle ERP, Data Analytics, CyberSecurity, etc.
- The general technical principles and the technical attributes of the associated profile are the focal points of this technical round. The interviewers will carefully review your résumé and have the chance to ask you questions regarding any previous projects or technological references you may have made. It will be quite helpful to review your resume in its entirety before applying for this round.
- Furthermore, issues pertaining to computer science foundations such as object-oriented programming concepts (OOPs), computer networks (CN), operating systems (OS), database management systems (DBMS), and computer organisation and architecture (CoA) may also arise.
- This is a technical round, although the interviewers are free to ask non-technical or HR-related questions. Depending on experience, more than one technical round can be required.
3. Partner Round:
Candidates will move on to the Partner Round based on how well they do in the Technical Round. PwC Pvt Ltd’s executive directors will make the decisions in this round. This round’s questions may be focused on technology, human resources, or both. In this stage, they also determine whether or not a candidate can fit well with the company’s culture.
4. HR Round:
The HR round will be the last one to play. The majority of the questions in this round will focus on your resume, prior experiences, and general HR inquiries. This phase also evaluates the candidate’s compatibility with the company’s culture. To find out more about PwC Pvt Ltd, make sure to read the mission and values listed in the About PwC section and visit the company’s website.
Top Pwc Python Interview Questions
Q1. What is Python? Describe the benefits of using Python
- Python is a general-purpose programming language with an emphasis on readability and an easy-to-learn syntax that lowers programme maintenance costs. In addition, the language enables third-party packages that promote modularity and code reuse, is fully open-source, and has scripting capabilities.
- Its dynamic typing and dynamic binding, along with its high-level data structures, draw a large developer community for rapid application development and deployment.
Q2. What is static and dynamic datatypes?
Answer: Before we can comprehend a language that is dynamically typed, we must first understand what typing is.In programming languages, type-checking is referred to as typing. Since strongly-typed languages, like Python, do not provide “type-coercion” (implicit data type conversion), “1” + 2 will produce a type error. Conversely, a language with weak typing, like Javascript, will only provide “12” as the output.
- Static: Before execution, data types are verified.
- Dynamic: During execution, data types are verified.
Q3. Define Interpreted language?
Q4. What is PEP 8 and mention its importance?
Q5. Define Scope in Python?
- The local objects accessible in the current function are referred to as the local scope.
- The items that have been accessible since the beginning of code execution are referred to as the global scope.
- The global objects of the current module that are accessible within the programme are referred to as a module-level scope.
- The term “outermost scope” describes all of the program’s callable built-in names.
- The name mentioned is found by searching the items in this scope last.
Q6. Differences between List and Tuples?
Q7. Explain the importance of global, protected and private attributes in Python?
Answer:
- Public variables defined within the global scope are referred to as global variables. We utilise the global keyword inside a function to access the variable in the global scope.
- Protected attributes are those that have an underscore (_sara, for example) prefixed to their identification. Although they are still accessible and modifiable from outside the class in which they are declared, a prudent developer should not do so.
- Private attributes are those that have a double underscore (__ansh) prefixed to their identifier. They cannot be directly accessed or modified from the outside, and any effort to do so would raise an AttributeError.
Q8. Define use of self in Python?
Q9. What is __init__?
Q10. Explain break, continue and pass in Python?
Answer:
Break | The break statement immediately ends the loop, and control moves to the statement that follows the loop’s body. |
---|---|
Continue | The continue statement ends the current iteration of the statement, moves the control to the subsequent iteration of the loop, and skips the remaining code in the current iteration. |
Pass | As previously mentioned, the pass keyword in Python is often used to fill in blank blocks and is comparable to an empty statement in languages like Java, C++, Javascript, etc., which is represented by a semicolon. |
Q11. What is unit tests in Python?
Answer:
- Python’s unit testing framework is called unit test.
- Unit testing is the process of testing individual software components. Could you consider the significance of unit testing? Consider the following scenario: you are developing software that makes use of three components, A, B, and C. Now let’s say that at some point your software malfunctions. How are you going to determine which part caused the software to malfunction? Perhaps it was component A that went bad, which led to component B failing as well, and the software failing as a result. There are numerous ways to combine these.
- For this reason, it’s essential to thoroughly test every component to identify the one that may be mostly to blame for the software’s failure.
Q12. Describe docstring in Python?
Answer:
- A multiline string known as a documentation string, or docstring, is used to describe a particular code segment.
- The function or method’s purpose should be explained in the docstring.
Q13. What is slicing in Python?
Answer:
- As the term implies, “slicing” refers to removing portions.
- Slicing has the syntax [start : stop : step].
- Start is the index to begin slicing a list or tuple from.
- The finishing index, or where to sop, is stop.
- The number of steps to jump is called step.
- Start is set to 0, step is set to the number of items, and stop is set to 1.
- Lists, tuples, arrays, and strings can all be chopped.
num = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(num[1 : : 2]) #output : [2, 4, 6, 8, 10]
Q14. Describe the process for making a Python script Unix executable.
Answer: Python script files have to start with #!/usr/bin/env.
Q15. Differences between Python Arrays and lists?
Answer:
- Python arrays can only have elements of the same data type; that is, they must have homogeneous data types. It uses a lot less memory than lists and is just a thin wrapper around arrays in the C language.
- Python lists can have elements of several data types; that is, they can have heterogeneous data types. Its drawback is that it uses a lot of memory.
Q16. How is memory managed in Python?
Answer:
- The Python Memory Manager is in charge of managing memory in Python. The manager allots memory in the form of a private heap region specifically for Python. This heap contains all Python objects and is private, meaning the programmer cannot access it. Python does, however, offer a few fundamental API functions for working with private heap space.
- Furthermore, Python incorporates a built-in garbage collection system to reuse unused memory for the private heap.
Q17. In Python, how do you copy an object?
- The assignment statement (= operator) in Python does not duplicate objects. Rather, it establishes a binding between the name of the target variable and the current object. In Python, we need to utilise the copy module in order to make copies of an object.
- Furthermore, the copy module has two methods for making copies of the specified object:Bit-wise copies of objects are known as shallow copies. The values of the original object are exactly duplicated in the copied object that was generated. Only the reference addresses for any values that are references to other objects are copied if any of the values is such.
- Deep Copy duplicates every value from the source to the destination object in a recursive manner, including the objects that the source object references.
Q18. Difference between xrange and range in Python?
Answer:
- Range() and xrange() have a lot of features in common. The main distinction between them is that whereas xrange() gives an xrange object, range() returns a Python list. Both methods produce a sequence of integers.
- What impact does that then have?It certainly does, as xrange() produces the value as needed rather than producing a static list like range() does. This technique is called “yielding” and is typically applied with an object-type generator.
- In applications where memory is limited, yielding is essential. In such cases, xrange() can handle it optimally by utilising just enough memory for the generator (far less than range()), which can cause a Memory Error when creating a static list.
Q19. Explain what is pickling and unpickling?
- In Python, the process of serialisation is called pickling. In Python, any object can be converted into a byte stream and stored in memory as a file. Pickling is a compact process, but pickled things can be compacted even further. Additionally, pickle maintains a record of the things it has serialised and allows for version portability.
- Pickle.dump() is the function utilised in the aforementioned procedure.
Unpickling:
- The exact opposite of pickling is unpickling. To rebuild the objects included in the file, it deserialises the byte stream and loads the object into memory.
- Pickle is the function utilised in the aforementioned procedure.load().
Experience the power of our python programming course with a free demo – enroll now!
Q20. Define PYTHONPATH?
Q21. What is the use of help() and dir() functions?
- It gives back an attribute list for Modules/Library objects that contains every attribute found in that module.
- It returns a list of all valid attributes and basic attributes for Class Objects.
- It produces a list of attributes in the current scope if no arguments are supplied.
Q22. Differences between .py and .pyc files?
Answer:
- Programme source code is stored in py files. The bytecode of your programme is contained in the.pyc file, however. Not every file that you run creates a.pyc file; some only generate bytecode after the compilation of the.py file (source code). It is made exclusively for the files you import.
- A Python program’s interpreter looks for the built files before running it. The virtual computer runs the file if it exists. It looks for a.py file if it cannot be found. If it is located, it is compiled into a.pyc file and run on a Python virtual machine.
- Compilation time is reduced when you have a.pyc file.
Q23. How Python is interpreted?
Answer:
- Python is not compiled or interpreted like a language. Compiling or interpreting is an implementation-specific characteristic. Python is interpreted generally and is a bytecode (collection of interpreter accessible instructions).
- Source code is contained in files ending with.py.
- Python assembles the source code into a virtual machine’s set of instructions. One implementation of that virtual machine is the Python interpreter.
- The.py source code is first compiled to produce.pyc, which is bytecode, and this intermediate format is known as “bytecode.” PyPy’s Just in Time (JIT) compiler or the standard CPython can then interpret this bytecode.
Q24. In python, how are arguments passed by value or by reference?
Answer:
- Pass by value: The real object is supplied as a copy. The value of the original object remains unchanged if the duplicate of the object is altered.
- Pass by reference: The real object is supplied as a reference. The value of the original object will change if the value of the new object changes.
Q25. Define iterators in Python?
- An iterator is an object.
- It remembers its state i.e., where it is during iteration (see code below to see how)
- __iter__() method initializes an iterator.
- It has a __next__() method which returns the next item in iteration and points to the next element. Upon reaching the end of iterable object __next__() must return StopIteration exception.
- It is also self-iterable.
- Iterators are objects with which we can iterate over iterable objects like lists, strings, etc.
Experience the power of our python programming course with a free demo – enroll now!