0% found this document useful (2 votes)
1K views

Matplotlib Assignment

This document contains a description of a housing dataset and 21 multiple choice questions about data visualization techniques in Python. The questions cover topics like importing libraries for charts, visualizing correlations, plotting boxplots, insights from visualizations, errors in code, and making inferences from various charts.

Uploaded by

Mona Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (2 votes)
1K views

Matplotlib Assignment

This document contains a description of a housing dataset and 21 multiple choice questions about data visualization techniques in Python. The questions cover topics like importing libraries for charts, visualizing correlations, plotting boxplots, insights from visualizations, errors in code, and making inferences from various charts.

Uploaded by

Mona Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Data Visualization

Assignment

[email protected]

+91-7022374614

US: 1-800-216-8930 (Toll-Free)


Description of the Dataset:
This dataset contains these columns: id, date, price, bedrooms, bathrooms,
sqft_living, sqft_lot, floors, waterfront, view, condition, grade, sqft_above,
sqft_basement, yr_built, yr_renovated, zip code, lat, long, sqft_living15, sqft_lot15.

Data Visualization

1. Which of the following libraries should be imported for creating charts in python?

a. Pandas
b. Random
c. Math
d. Matplotlib

2. How to visualize the correlation pattern in the dataset?


a. Histogram
b. Bar plot
c. Scatterplot
d. Heatmap

3. Which function can we use for plotting the boxplot?


a. sns.box()
b. plt.bplot()
c. sns.boxplot()
d. pl.boxplt()

4. What insights can we extract from the boxplot?


a. 2nd quartile
b. 1st quadrille
c. 3rd quartile
d. All of the above

5. Which visualization is not part of matplotlib?


a. Table plot
b. Area plot
c. Violin plot
d. All of the above
6. From which visualization we can find the median/mean value of
the data?
a. Bar plot
b. Boxplot
c. Violin plot
d. All of the above
7. Which of the following is correct?
a. plt.scatter(data[‘gender’],data[‘age’])
b. plt.boxpt(data[‘gender’],data[‘age’])
c. plt.scatter(data[‘salary’],data[‘age’])
d. None of the above

8. What error you will get after executing the below


code: data.box('bedrooms','grade')
a. Attribute error
b. Syntax error
c. Runtime error
d. None of the above

9. Which of the following code you can use for plotting the
pie chart:
a. plt.pie(x)
b. sns.pie(x)
c. Both of the above
d. None of the above

10. What is the correct way of plotting violin plot?

a. sns.violinplot(data=data, y = 'price',x 'waterfront')


b. sns.violin(data=data, y = 'price',x = 'waterfront')
c. plt.violinplot(data=data, y = 'price',x='waterfront')
d. All of the above
11. Select the incorrect syntax:
a. plt.figsize()
b. plt.figtext()
c. plt.figpic()
d. Both A and C

12. What inference you can extract from the below


graph:
a. The cheapest house is having 3 floors.
b. The costliest house is having 2.5 floors.
c. The maximum number of houses are having 1 floor
only
d. All of the above
13. Which of the following statements are correct with respect to the
below image:

a. The maximum number of houses have grades of either 7 or 8.


b. Around 2000 houses are having grades between 6 and 7.
c. Both of the above.
d. None of the above.
14. Which of the following statements is/are correct with respect to the below image:

a. The average-priced house has grades between 10 and 12.


b. The costliest house is having a grade below 10.
c. As the price is getting higher, grades are also getting higher.
d. The average-priced house is having average grades.

15. Which statement is correct with respect to the below


image:

a. The maximum number of houses are not having any view.


b. Around 300 houses are having only one view.
c. The 4th category is having the least count of houses.
d. All of the above.
16. Which of the following statements are correct with respect to the below image:

a. All categories of floors are having outliers.


b. We can handle the outliers by replacing them with the mean of the
column. c. We can handle the outliers by replacing them with the mode of
the column.
a. Only a is correct
b. a&c are correct
c. b&c are correct
d. All statements are correct.
17. Which statement is correct with respect to the below image:
a. Maximum houses have zip codes between 98100 and 98125.
b. A Smaller number of houses have zip codes between 98075 and 98100.
c. The houses that are having zip codes between 98000 and 98050 are
having the costliest houses.
d. All of the above.

18. Which of the following statements is/are correct with respect to the below image:

a. If the price is getting higher, the area of sqft_living is also


increasing.
b. If the price is getting lower, the area of sqft_living is decreasing.
c. The costliest house has the maximum sqft of living area.

A. A and B
B. A and C
C. B and C
D. Only A
E. Only B
F. Only C
19. Which of the following statements are correct with respect to the below image:

a. The interquartile range for the 4th category of view is the highest among
the rest of the views.

b. The houses that are having no view, are having a high probability of having
a cheap house.

c. Both of the above.

d. None of the above.

20. Which of the following statements is/are correct with respect to the below image:
a. The average area of square foot living in 3 number floors is very close to its
1st quartile value.
b. The 1st quartile value and the minimum square feet of living space are
almost the same.
c. Each category of floors are having outliers.
d. All of the above.
21. Which of the following statements is/are correct with respect to the below image:

a. If the condition is increasing, the price of the house is also increasing.


b. The costliest house is having the 5th category of condition.
c. The 4th category of the condition is having the maximum number of houses.
d. None of the above.

You might also like