Untitled
unknown
plain_text
a year ago
498 B
9
Indexable
import matplotlib.pyplot as plt
# Fixed amount of chocolate whiskey
x = 60
# Lemon curd should be between 30 and 40
y = range(30, 41)
# Corresponding amount of butterscotch
z = [40 - i for i in y]
# Plotting
plt.plot(y, z, label='y + z = 40')
plt.fill_between(y, z, color='lightgray', alpha=0.5) # Feasible region
plt.xlabel('Amount of Lemon Curd (grams)')
plt.ylabel('Amount of Butterscotch (grams)')
plt.title('Feasible Region for Ice Cream Flavors')
plt.legend()
plt.grid(True)
plt.show()
Editor is loading...
Leave a Comment