Advertisement
Guest User

make_chocolate

a guest
Apr 7th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1.  def make_chocolate(self, recipe_name: str):
  2.         if recipe_name in self.recipes:
  3.             if recipe_name not in self.products:
  4.                 self.products[recipe_name] = 1
  5.             else:
  6.                 self.products[recipe_name] += 1
  7.            
  8.         else:
  9.             raise TypeError("No such recipe")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement