2
print(7 % 3)
import pandas as pd
Which command loads Pandas?
A. import pandas as pd
B. import panda as pd
C. import pd
D. from pandas import *
plt.show()
Which command displays the plot?
A. plt.open()
B. plt.display()
C. plt.show()
D. plt.start()
11
What is the output of:
x = 5; print(x * 2 + 1)
False
print(10 > 5 and 2 > 3)
df.tail(3)
Which command shows the last 3 rows of a DataFrame?
A. df.tail(3)
B. df.start(3)
C. df.head(3)
D. df.first(3)
plt.plot()
Which command creates a basic line plot?
A. plt.line()
B. plt.plot()
C. plt.graph()
D. plt.map()
True
print(4 == 4)
7
What is the output?
x = 5
x + = 2
print(x)
df["Age"]
How do you select a single column named “Age”?
A. df(Age)
B. df.[Age]
C. df["Age"]
D. Both B and C
sns.heatmap()
You want to see which columns in your dataset have higher or lower correlation with each other using colors. Which Seaborn function helps you do this?
A. sns.barplot()
B. sns.heatmap()
C. sns.boxplot()
D. sns.scatterplot()
Hello Alex
What is the output of
name = "Alex";
print("Hello ", name)
3 2 1
x = 3
while x > 0:
print(x)
x -= 1
A. 3
B. 3 2 1
C. 1 2 3
D. Infinite loop
pd.read_excel()
Which function reads an Excel file?
A. pd.read_excel()
B. pd.import_excel()
C. pd.read_xlsx()
D. pd.open_excel()
Add a title
What is the purpose of plt.title("Graph Title")?
A. Add color
B. Add a title
C. Add a caption
D. Resize the plot
contract law
What is the output of the string method:
case = "Contract Law";
print(case.lower())
Hi Hi
for i in range(2):
print("Hi")
A. Hi
B. Hi Hi
C. Nothing
D. Error
df.shape
Which command shows the number of rows and columns in a DataFrame?
A. df.size
B. df.shape
C. df.count()
D. df.length()
import matplotlib.pyplot as plt
plt.bar(x, y)
plt.scatter(x, y)
plt.show()
You have two lists in Python:
Which Matplotlib command will create:
a) A bar chart of x vs y?
b) A scatter plot of x vs y?
45
sum_val = 0
for i in range(10):
sum_val = sum_val + i
print(sum_val)