Problem 1: Given input undirected graph, create and print adjacency list and adjacency matrix representations graph. Input Format: The input is a text file which describes undirected graph. The first line file specifies n & m, number of vertices and number edges graph respectively. The next m lines specify m edges of the graph, one line per edge. An edge described by its end points. If number vertices is n, assume that vertices graph are numbered (0,1,..n-1). Output Format: Print adjacency list and adjacency matrix representation of the graph. adjacency list representation, for given vertex, order of its adjacent vertices does not matter. Sample Input (for the graph shown above): 8 10 0 1 1 2 0 3 3 4 3 6 4 6 5 4 5 6 7 6 5 7 Sample Output: Adjacency list representation: 0: 1 3 1: 0 2 2: 1 3: 0 6 4 4: 3 6 5 5: 4 6 7 6: 3 5 4 7 7: 5 6 Adjacency matrix representation: 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 0
preprocess the data and by giving a proper rationale behind the steps you would follow. The two datasets should be merged before preprocessing. first task in your new job, to check the quality of the data for the next step of analysis. Following are the additional description
a) The data set contains six variables - Date,Open,Close,HIgh,Low,volume
the stock market opens at 9:15 hours and closes at 15:30 hours. Each stock is defined by an opening 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 . On some days when there is no trading.Furthermore, your manager also claims that the model prediction is too bad since data is polluted.
Write a code to convert a one dimensional array into three dimensional array using built-in function.
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.