mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-14 05:06:55 +01:00
part 2 of module 6
This commit is contained in:
27
06/alchemy/potions.py
Normal file
27
06/alchemy/potions.py
Normal file
@@ -0,0 +1,27 @@
|
||||
def healing_potion() -> str:
|
||||
from .elements import create_water, create_fire
|
||||
|
||||
return f"Healing potion brewed with {create_fire()} and {create_water()}"
|
||||
|
||||
|
||||
def strength_potion() -> str:
|
||||
from .elements import create_earth, create_fire
|
||||
|
||||
return f"Strength potion brewed with {create_earth()} and {create_fire()}"
|
||||
|
||||
|
||||
def invisibility_potion() -> str:
|
||||
from .elements import create_air, create_water
|
||||
|
||||
return (
|
||||
f"Invisibility potion brewed with {create_air()} and {create_water()}"
|
||||
)
|
||||
|
||||
|
||||
def wisdom_potion() -> str:
|
||||
from .elements import create_water, create_fire, create_air, create_earth
|
||||
|
||||
res = ""
|
||||
for fn in (create_water(), create_fire(), create_air(), create_earth()):
|
||||
res += fn
|
||||
return f"Wisdom potion brewed with all elements: {res}"
|
||||
Reference in New Issue
Block a user