mod 10 ex 1 WIP

This commit is contained in:
2026-03-14 15:34:04 +01:00
parent 4f31ce6762
commit 5cfb944136
+13 -1
View File
@@ -44,6 +44,10 @@ def pow_2(nb: int) -> int:
return nb * nb return nb * nb
def spell_transformer(spell: str) -> str:
return "* " + spell + " *"
def main() -> None: def main() -> None:
try: try:
print("=== spell_combiner ===") print("=== spell_combiner ===")
@@ -60,7 +64,15 @@ def main() -> None:
print(f"Invalid: {caster(2, str)}") print(f"Invalid: {caster(2, str)}")
print("\n=== spell_sequence ===") print("\n=== spell_sequence ===")
sequencer = spell_sequence([fireball, heal, isinstance]) sequencer = spell_sequence(
[
fireball,
heal,
spell_transformer,
]
)
print(f"Sequence result: {sequencer('dragon')}")
except Exception as err: except Exception as err:
print(err) print(err)