Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def make_chocolate(self, recipe_name: str):
- if recipe_name in self.recipes:
- if recipe_name not in self.products:
- self.products[recipe_name] = 1
- else:
- self.products[recipe_name] += 1
- recipe_needed_ingredients = self.recipes[recipe_name]
- for k, v in recipe_needed_ingredients.values():
- self.remove_ingredient(k, v)
- else:
- raise TypeError("No such recipe")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement