mirror of
https://github.com/DavidGailleton/42-Piscine_Python.git
synced 2026-03-14 05:06:55 +01:00
part 3 of module 06
This commit is contained in:
11
06/alchemy/transmutation/__init__.py
Normal file
11
06/alchemy/transmutation/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from .basic import lead_to_gold, stone_to_gem
|
||||
from .advanced import philosophers_stone, elixir_of_life
|
||||
|
||||
__version__ = "1.0.0"
|
||||
__author__ = "Master Pythonicus"
|
||||
__all__ = [
|
||||
"lead_to_gold",
|
||||
"stone_to_gem",
|
||||
"philosophers_stone",
|
||||
"elixir_of_life",
|
||||
]
|
||||
11
06/alchemy/transmutation/advanced.py
Normal file
11
06/alchemy/transmutation/advanced.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from .basic import lead_to_gold
|
||||
from ..potions import healing_potion
|
||||
|
||||
|
||||
def philosophers_stone() -> str:
|
||||
return f"Philosopher’s stone created using {lead_to_gold()}\
|
||||
and {healing_potion()}"
|
||||
|
||||
|
||||
def elixir_of_life() -> str:
|
||||
return f"Elixir of life: eternal youth achieved!"
|
||||
9
06/alchemy/transmutation/basic.py
Normal file
9
06/alchemy/transmutation/basic.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from alchemy.elements import create_fire, create_earth
|
||||
|
||||
|
||||
def lead_to_gold() -> str:
|
||||
return f"Lead transmuted to gold using {create_fire()}"
|
||||
|
||||
|
||||
def stone_to_gem() -> str:
|
||||
return f"Stone transmuted to gem using {create_earth()}"
|
||||
Reference in New Issue
Block a user