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.
Final Value with Appreciation
Given principal amount
principal as an input, time period in years time and appreciation percentage apprPercentage as optional inputs, write a JS function to return the final value finalValue with the given appreciation percentage and time period. The default values for time and apprPercentage are 2 and 5 respectively.
Quick Tip
The formula to calculate the final value with appreciation is,
finalValue = principal * (1 + time * appreciation / 100)
Input
The first line of input contains a number principal
The second line (optional) of input contains a number time
The third line (optional) of input contains a number apprPercentage
Output
The output should be a single line containing the finalValue
Sample Input 1
1000
2
3
Sample Output 1
1060
Sample Input 2
3000
Sample Output 2
3300.0000000000005but
sample input 2
2000
helf me how to solve it
Sample Program Run
Enter the number of test cases: 1
Enter the size of the array: 5
Enter the number of rotation to perform: 2
Enter the elements of the array: 1 2 3 4 5
Resulting array: 4 5 1 2 3
Sample Program Run:
Enter number of test cases: 3
Enter the size of the array: 5
Enter the elements of the array: 5 1 4 2 3
Number of Inversions: 6
Enter the size of the array: 10
Enter the elements of the array: 2 1 3 4 5 6 7 9 8 10
Number of Inversions: 2
Enter the size of the array: 7
Enter the elements of the array: 4 1 3 5 2 3 8
Number of Inversions: 7
Create a program that will accept inputs into a 20-element one-dimensional integer
array CountArray. Your program should count the odd and even numbers that appeared in
the list of accepted values.
Write a program that accepts a letter grade as input and outputs the teacher's remarks. Use only switch, do not use any if's. Example: If 'A' or 'a', then "Excellent job!". If 'F' or 'f', then "You failed. Please study more next time."
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.
Write a program to take a String as input then display the words which starts with vowel and also display how many such words found.
For example:
Enter a String
HELLO world elePhaNt rUsh imagine
Words which start from vowel
elePhaNt imagine
No. of such words: 2