0
0
Data Analysis Pythondata~10 mins

Why visualization communicates findings in Data Analysis Python - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the library used for creating visualizations.

Data Analysis Python
import [1] as plt
Drag options to blanks, or click blank then click option'
Aseaborn
Bmatplotlib.pyplot
Cpandas
Dnumpy
Attempts:
3 left
💡 Hint
Common Mistakes
Importing the wrong library like numpy or pandas for plotting.
Not using the correct alias 'plt'.
2fill in blank
medium

Complete the code to create a simple line plot of the data list.

Data Analysis Python
data = [1, 3, 2, 5]
plt.[1](data)
plt.show()
Drag options to blanks, or click blank then click option'
Ahist
Bscatter
Cplot
Dbar
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'scatter' which creates a scatter plot, not a line plot.
Using 'hist' which creates a histogram.
3fill in blank
hard

Fix the error in the code to label the x-axis correctly.

Data Analysis Python
plt.plot([1, 2, 3], [4, 5, 6])
plt.xlabel([1])
plt.show()
Drag options to blanks, or click blank then click option'
A'x label'
Bx label
Cx_label
Dxlabel
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the label text.
Using incorrect variable names instead of a string.
4fill in blank
hard

Fill both blanks to create a bar chart with labels and title.

Data Analysis Python
plt.bar(['A', 'B', 'C'], [5, 7, 3])
plt.xlabel([1])
plt.title([2])
plt.show()
Drag options to blanks, or click blank then click option'
A'Categories'
B'Values over Categories'
C'Data Labels'
D'Bar Chart'
Attempts:
3 left
💡 Hint
Common Mistakes
Using labels that do not describe the axis or chart clearly.
Forgetting to put quotes around the labels.
5fill in blank
hard

Fill all three blanks to create a scatter plot with axis labels and a title.

Data Analysis Python
x = [1, 2, 3, 4]
y = [10, 15, 13, 17]
plt.scatter(x, y)
plt.xlabel([1])
plt.ylabel([2])
plt.title([3])
plt.show()
Drag options to blanks, or click blank then click option'
A'Time (seconds)'
B'Speed (km/h)'
C'Speed over Time'
D'Distance (meters)'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up x and y labels.
Not using descriptive labels or title.
Forgetting quotes around strings.