Accenture Interview Questions Glassdoor

3 Using the product_price table, write an SQL query to find the record with the fourth-highest market price.

Fig: Product Price table

select top 4 * from product_price order by mkt_price desc;

Now, select the top one from the above result that is in ascending order of mkt_price.

accenture interview questions glassdoor

2 What is the function to find the day of the week for a particular date value?

The get the day of the week, you can use the WEEKDAY() function.

The above function will return 6 as the result, i.e., 17th December is a Saturday.

6 How will you reverse a list in Python?

The function list.reverse() reverses the objects of a list.

6 How will you remove the last object from a list in Python?

Here, −1 represents the last element of the list. Hence, the pop() function removes the last object (obj) from the list.

Get certified in Python from the top Python Course in Singapore now!

2 How to comment with multiple lines in Python?

To add a multiple lines comment in python, all the line should be prefixed by #.

5 How will you read a random line in a file?

We can read a random line in a file using the random module.

For example:

Define encapsulation in Python?

encapsulation in Python refers to the process of wrapping up the variables and different functions into a single entity or capsule.Python class is the best example of encapsulation in python.

9 Write a program to produce Fibonacci series in Python?

Fibonacci series refers to the series where the element is the sum of two elements prior to it.

What is pickling and unpickling?

The Pickle module accepts the Python object and converts it into a string representation and stores it into a file by using the dump function. This process is called pickling. On the other hand, the process of retrieving the original Python objects from the string representation is called unpickling.

Want to know about the real-world uses of Python? Read our detailed blog on Python Applications now.

2 Explain how VLOOKUP works in Excel?

VLOOKUP is used when you need to find things in a table or a range by row.

VLOOKUP accepts the following four parameters:

lookup_value – The value to look for in the first column of a table

table – The table from where you can extract value

col_index – The column from which to extract value

range_lookup – [optional] TRUE = approximate match (default). FALSE = exact match

Let’s understand VLOOKUP with an example.

If you wanted to find the department to which Stuart belongs to, you could use the VLOOKUP function as shown below:

Here, A11 cell has the lookup value, A2:E7 is the table array, 3 is the column index number with information about departments, and 0 is the range lookup.Â

If you hit enter, it will return “Marketing”, indicating that Stuart is from the marketing department.

3 How do you write comments in python?

Python Comments are the statement used by the programmer to increase the readability of the code. With the help of #, you can define the single comment and the other way to do commenting is to use the docstrings(strings enclosed within triple quotes). For example:

Master Python by taking up this online Python Course in Toronto!

What is PYTHONPATH?

PYTHONPATH has a role similar to PATH. This variable tells Python Interpreter where to locate the module files imported into a program. It should include the Python source library directory and the directories containing Python source code. PYTHONPATH is sometimes preset by Python Installer.

How to prepare for job interview with glassdoor

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *