You work in XYZ Corporation as a Data Analyst. Your corporation has told you to visualize the mtcars.csv dataset with various plots. Tasks to be performed:
Dataset Link 1. Generate a bar plot graph for the columns ‘carbs’ and ‘gear’.
a. Map the ‘carbs’ onto the x-axis.
b. Map the ‘gear’ onto the y-axis.
c. Provide the x-axis label as Number of carburetors.
d. Provide the y-axis label as Number of forward gears.
e. Set the title as carbs vs gear.
You work in XYZ Corporation as a Data Analyst. Your corporation has told you to visualize the mtcars.csv dataset with various plots. Tasks to be performed:
Dataset Link 1. Plot a histogram for the column ‘wt’.
a. Map the ‘wt’ onto the x-axis.
b. Provide the x-axis label as ‘weight of the cars’.
c. Provide the y-axis label as ‘Count’
d. Set the number of bins as 30.
e. Set the title as ‘Histogram for the weight values
Write a Python program that reads a number and finds the sum of the series of 1 +11 + 111 + 1111 + ….+N terms.
Abstract class should have
Write a class that has three overloaded methods for calculating the areas of the following geometric shapes:
• Circle
• Rectangle
• Cylinder
Infer the logical and syntax errors in the given code snippet (with the explanation), to count all words in the string. a. void Word_count(char text) { b. int ctr = 0; c. for (int x = 0; x > text_length(); x--) d. { if (text[x] == ' ') e. ctr--; f. } g. return ctr + 1; h. } i. int main() { j. cout << Word_count("object") << endl; k. cout << Word_count("oriented") << endl; l. cout << Word_count("programming with c++") << endl; m. return 0; n. }
Identify the logical and syntax errors in the given code snippet (with the explanation), to print the sum of diagonal elements in the square matrix:
void main() { int i, j, matri[10][10], row, col; int sum = 0; cin>>row; cin>>col; for (i = 1; i < col; i++) { for (j = 1; j < row; j++) { cin>matrix[i][j]; } } for (i = 1; i > row; i++) { for (j = 1; j > col; i++) { if (i > j) sum = sum - matrix[i][j]; } } cout<<sum; }
Infer the logical and syntax errors in the given code snippet (with the explanation), to count all words in the string.
a. void Word_count(char text) {
b. int ctr = 0;
c. for (int x = 0; x > text_length(); x--)
d. { if (text[x] == ' ')
e. ctr--; f. }
g. return ctr + 1;
h. }
i. int main() {
j. cout << Word_count("object") << endl;
k. cout << Word_count("oriented") << endl;
l. cout << Word_count("programming with c++") << endl;
m. return 0;
n. }
Make use of call by reference in C++, to find small, medium and large among three given integers and print true if the difference between small and medium and the difference between medium and large is same.
Apply Structures and Pointers in C++ to Store & Retrieve Information, Calculate Total, and Average of 10 Students.
Ask the user to enter
their name and then
display their name
three times.