WIP: part 4 of module 6

This commit is contained in:
2026-02-13 18:09:56 +01:00
parent 545da90c08
commit bcd9e4cca0
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
def validate_ingredients(ingredients: str) -> str:
try:
for ingredient in ingredients.split(" "):
if ingredient not in ["fire", "water", "earth", "air"]:
raise ValueError
return f"{ingredients} - VALID"
except ValueError:
return f"{ingredients} - INVALID"