Prompt:
"Write Python code to generate a heatmap of correlation coefficients with color-coded annotations."
Output:
import seaborn as sns import matplotlib.pyplot as plt
df = sns.load_dataset('iris').drop(columns=['species'])
plt.figure(figsize=(8, 6)) sns.heatmap(df.corr(), annot=True, cmap='coolwarm', fmt='.2f') plt.title('Correlation Heatmap') plt.show()