Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A chef needs to buy red and green peppers. He can buy from 3 vendors. Vendor 1 s

ID: 3675828 • Letter: A

Question

A chef needs to buy red and green peppers. He can buy from 3 vendors. Vendor 1 sells a box of 20 red peppers and 10 green peppers for $60. Vendor 2 sells a box of 10 red peppers and 10 green peppers for $40. Vendor 3 sells a box of 10 red peppers and 20 green peppers for $50. The restaurant needs 350 red peppers and 400 green peppers. Using Python version 2.7, I would like to know a) How many boxes should he buy from each vendor in order to minimize cost and b) the minimum cost.

Please show all steps, using basic packages over advanced functions when possible. Thanks!

Explanation / Answer

import vendor

#Vendor
def minimize()
red,green=350,400
v1,v2,v3=60,40,50
cost,mincost=0,0
noboxv1=5
cost1=5*60
noboxv2=15
cost2=15*40
noboxv3=10
cost3=10*50
mincost=cost2
print "the maximum number of boxes taken from vendor II"

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote