Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Prepare a presentation slide on Binary search (not more than 8 slides )

a) include the process of binary search algorithm and its complexity.


Write a program to increment N by 5, if N me s greater than 10, otherwise by 1.

Problem Statement: You work in XYZ Corporation as a Data Analyst. Your corporation has told you to visualize the mtcars.csv dataset with various plots. 


1. Plot the area chart for the colmns: ‘am’ and ‘carb’.

a. Set the ‘am’ on the x-axis.

b. Set the ‘carb’ on the y-axis.

c. Provide the x-axis label as Transmission.

d. Provide the y-axis labe as Number of carburetors.

e. Provide the title as Transmission vs Number of carburetors.


Problem Statement: You work in XYZ Corporation as a Data Analyst. Your corporation has told you to analyze the customer_churn dataset with various functions.


1. Now from the churn data frame, try to sort the data by the tenure column according to the descending order.

2. Fetch all the records that are satisfying the following condition:

a. Tenure>50 and the gender as ‘Female’.

b. Gender as ‘Male’ and SeniorCitizen as 0.

c. TechSupport as ‘Yes’ and Churn as ‘No’.

d. Contract type as ‘Month-to-month’ and Churn as‘Yes’


Problem Statement: You work in XYZ Corporation as a Data Analyst. Your corporation has told you to analyze the customer_churn dataset with various functions


1. Now select the rows from 20th index till 200th index (exclusive), and columns from 2nd index till 15th index value


Problem Statement: You work in XYZ Corporation as a Data Analyst. Your corporation has told you to analyze the customer_churn dataset with various functions.


1. Display the top 100 records from the original data frame.

2. Display the last 10 records from the data frame.

3. Display the last record from the data frame


3.Create a function that concatenates two dataframes. Use previously created function to create two dataframes and pass them as parameters Make sure that the indexes are reset before returning: 


4. Write code to load data from cars.csv into a dataframe and print its details. Details like: 'count', 'mean', 'std', 'min', '25%', '50%', '75%', 'max'. 


5. Write a method that will take a column name as argument and return the name of the column with which the given column has the highest correlation. The data to be used is the cars dataset. The returned value should not the column named that was passed as the parameters.

E.G: get_max_correlated_column('mpg')

-> should return 'drat' 


Problem Statement:

You work in XYZ Company as a Python. The company officials want you to build a python program. 

1. Write a function that takes start and end of a range returns a Pandas series object containing numbers within that range. In case the user does not pass start or end or both they should default to 1 and 10 respectively. eg. range_series()

-> Should Return a pandas series from 1 to 10 range_series(5)

-> Should Return a pandas series from 5 to 10 range_series(5, 10)

-> Should Return a pandas series from 5 to 10. 


2. Create a function that takes in two lists named keys and values as arguments. Keys would be strings and contain n string values. Values would be a list containing n lists.

The methods should return a new pandas dataframe with keys as column names and values as their corresponding values e.g.

-> create_dataframe(["One", "Two"], [["X", "Y"], ["A", "B"]]) -

> should return a dataframe One Two 0 X A 1 Y B 


Single digit number : Ram is given a positive integer N. He wishes to convert this integer into a single numeral. He does so by repeatedly adding the numericals of the number until there is only a single numeral. Help ram by providing the single-numeral number finally obtained




Input:




The input is single line containing a positive integer N




Output :




The output should be a single-line containing a single - numeral number





Sample input :




545




Sample output :




5

Friend and Enemy

A group of F friends went to a haunted house.Each member was given a shirt with a number on it ranging from 1 to F. As they entered the haunted house, one of them was kidnapped and an enemy joined them.But unfortunately, the enemy didn't wear the shirt with the same number as the kidnapped one, instead wore the same as some other person.Find the numbers on the shirts of the enemy and the kidnapped person.


Input

The input is a single line containing space-separated positive integers from 1 to F.


Output

The output should be a single line containing the shirt numbers of the enemy and kidnapped person separated by a space.


Explanation

The given array is 3 1 5 2 1.

In the range from 1 to 5, the number 1 has occured twice and 4 is the missing number. So, 1 belongs to the enemy's shirt, and 4 belongs to kidnapped.Hence, the output should be 1 4.


Sample Input1

3 1 5 2 1

Sample Output1

1 4


Sample Input2

1 2 2 4

Sample Output2

2 3


1. Create a new list and populate it with 15 random integers (Tip: use randint() or randrange() from the random module)

2. Write a function to calculate the average of the list values

3. Write a function to test if the list contains a specific value

4. Write a function to reverse the list using .pop() and .append() (you must not use .reverse()).


Ram is given a positive integer N. He wishes to convert this integer into a single numeral . He does so by repeatedly adding the numerals of the number until there is only a single numeral . Help Ram by providing the single - numeral number finally obtained .




Input


The input is a single line containing a positive integer N.




Output




The output should be a single line containing a single-numeral number.




Explanation




In the example, the given number is 545.


As the number is more than a single numeral, repeatedly add the numerals like




5 + 4 + 5 => 14


1 + 4 => 5




So, the output should be 5.






Sample Input 1


545


Sample output 1


5




Sample Input 2


111


Sample output 2


3


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS