Solution to exercise 3 #4

Open
emiliaja wants to merge 3 commits from emiliaja/2024-heraklion-ODD:python_expert into main
Showing only changes of commit 73475c95d5 - Show all commits

18
src/make_potion.py Normal file
View file

@ -0,0 +1,18 @@
from brewing import potion_class
from brewing import cooking
from brewing import containers
def make_example_potion(student_name="ASPP student"):
my_potion = potion_class.Potion(student_name=student_name)
# Set up your old kettle and light an eternal flame underneath it.
my_potion.setup(container=containers.OLD_KETTLE, heat_source="eternal_flame")
# Simmer for 5 hours.
cooking.simmer(my_potion, duration=5)
print(f"You successfully ran make_example_potion, {student_name}, well done :).")
return my_potion
my_name = 'ASPP student'
my_potion = make_example_potion(student_name=my_name)