Fantasy Quest added a new Alchemy skill.
Complete the check_ingredient_match function. It accepts two lists of strings:
recipe: The list of ingredients needed.inventory: The list of ingredients the character has.It should return two values:
Assume that the recipe list won't contain any duplicates (recipes require only one ingredient of each kind).
For example, if these were the lists:
recipe = ["Dragon Scale", "Unicorn Hair", "Phoenix Feather", "Troll Tusk"]
ingredients = ["Dragon Scale", "Phoenix Feather", "Troll Tusk"]
percentage, missing_ingredients = check_ingredient_match(recipe, ingredients)
print(percentage, missing_ingredients)
# Prints: 75.00 ["Unicorn Hair"]
Your spellbook entry about the "in" keyword may be helpful here!
Just search for "List Operations - Contains".