Question: Write a function baking _ contest ( time _ left, pastries ) that takes in two parameters: time _ left is an integer representing the

Write a function baking_contest(time_left, pastries) that takes in two parameters: time_left is an integer representing the time remaining in the competition in minutes, and pastries is a nested list representing a table of all the possible pastries. Each inner list consists of three elements: the first is the name of the pastry (a string), the second is how much time it would take you to bake (an int), and the third is how many points its worth (an int).
The function should return an integer representing the maximum number of points you could receive from baking any valid combination of pastries.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!