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

Write a code to plot sine and cosine functions graph using subplot.


a)     Typically, the stock market opens at 9:15 hours and closes at 15:30 hours. Each stock is defined by an opening price and a closing price which are the prices it opens and closes with. Within the operating hours, the stock price touches a maximum and minimum which are the highest and lowest prices achieved by the stock in the working hours of the stock market. You have access to ten years of monthly stock price data with the Open, High, Low and Close price and the number of stocks traded for each day given by the feature Volume. On some days when there is no trading, the parameters Open, High, Low and Close remain constant and Volume is zero.

 

Furthermore, your manager also claims that the model prediction is too bad since the data is polluted. Try to impress your new boss by preprocessing the data and by giving a proper rationale behind the steps you would follow. The two datasets should be merged before preprocessing. 



4.Read the given data ‘TIPS.csv’ as a dataframe named Tips and answer the following question.

a) In the tips dataframe, for the variable “total bill” what is the 3rd quartile and maximum value? 

b) The range of the variable “TotalBill”?


7. From the given below boxplot identify the median value and the outlier.



Make 3D heart with Happy Valentine's Day inside using python code


a.     Write a python script to take two string S1 and S2 and do the following:

i)               Check S1 and S2 are anagrams or not.

ii)              Check S1 is Sub string of S2 or not.

iii)            S1 is palindrome or not


Write a program to print the sum of two numbers, A and B. If their sum is less than 10, otherwise print the product of numbers

size1 and size2 are the sizes of two files, and space is the amount of available space on a flash drive. Write a function that takes these integer numbers as arguments and figures out the largest combination of files that fits on a flash drive. The method should return 3 if both files fit together, the file number (1 or 2) corresponding to the longest file that fits by itself (1 if the files are the same size), or 0 if neither file fits on the flash drive.

Your function must have only one return statement.


Part 1



The volume of a sphere is 4/3πr3, where π has the value of "pi" given in Section 2.1 of your textbook. Write a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.



Call your print_volume function three times with different values for radius.



Include all of the following in your Learning Journal:



The code for your print_volume function.


The inputs and outputs to three calls of your print_volume.



Part 2



Write your own function that illustrates a feature that you learned in this unit. The function must take at least one argument. The function should be your own creation, not copied from any other source. Do not copy a function from your textbook or the Internet.



Include all of the following in your Learning Journal:



The code for the function that you invented.


The inputs and outputs to three calls of your invented function.


A description of what feature(s) your function illustrates.

In a class test teacher announces the marks (negative marking is allowed) of n students a student can achieve maximum 100 marks. Write a python function p-marks (*marks) that takes number of students, marks of students and return the marks and check the marks are valid or not. If valid then it calls the recursive function rec-sort(*marks) which returns the students marks as comma separated string with elements in ascending order (you can use built in function max or min to do this). Specify the input in fixed form do not use input function.


1.     There are 3 arrangements of the word DAD, namely DAD, ADD, and DDA. How many arrangements are there of the word ENDURINGLY?

 

 

2.     There are 13 men and 12 women in a ballroom dancing class. If 6 men and 6 women are chosen and paired off, how many pairings are possible?

 

 

3.     Suppose you are taking a multiple-choice test with 4 choices for each question. In answering a question on this test, the probability that you know the answer is 0.33. If you don’t know the answer, you choose one at random. What is the probability that you knew the answer to a question, given that you answered it correctly?


4.   A normal distribution which has a mean of 50 and standard deviation of 7 is taken into consideration.

68% of the distribution can be found between what two numbers?

a)      40 and 60

b)     0 and 43

c)      0 and 68

d)     43 and 57

 


5.    Consider the data X = (58,59,63,60,60,63,60,57,58,59). An unbiased estimation for population variance would be ____