diff --git a/materials/part1_local_imports.pptx b/materials/part1_local_imports.pptx index 14e0bb6..8c54fd0 100644 Binary files a/materials/part1_local_imports.pptx and b/materials/part1_local_imports.pptx differ diff --git a/materials/part4_accessibility.pptx b/materials/part4_accessibility.pptx index 7b53256..e1e95c5 100644 Binary files a/materials/part4_accessibility.pptx and b/materials/part4_accessibility.pptx differ diff --git a/src/italianfood/drinks.py b/src/italianfood/drinks.py index 4ec0700..0b6d39d 100644 --- a/src/italianfood/drinks.py +++ b/src/italianfood/drinks.py @@ -1,11 +1,11 @@ -class Schorle: - juice: str +class Lemonade: + fruit: str - def __init__(self, juice): - self.name = f"{juice}schorle" + def __init__(self, fruit): + self.name = f"{fruit} lemonade" -def make_apfelschorle(): - print("Mixing a delicious Apfelschorle!\n...") - apfelschorle = Schorle(juice="apple") - return apfelschorle +def make_lemonade(): + print("Squeezing some zesty lemons for fresh lemonade!\n...") + lemonade = Lemonade(fruit="lemon") + return lemonade diff --git a/src/italianfood/make_pizza_refactored.py b/src/italianfood/make_pizza_refactored.py deleted file mode 100644 index 55a158e..0000000 --- a/src/italianfood/make_pizza_refactored.py +++ /dev/null @@ -1,77 +0,0 @@ -from italianfood.dough import PizzaDough -from italianfood.ovens import bake_pizza - -STANDARD_FLOUR_WEIGHT = 180 # grams per pizza -STANDARD_WATER_WEIGHT = 126 # grams per pizza -STANDARD_SALT_WEIGHT = 2 # grams per pizza -STANDARD_YEAST_WEIGHT = 1 # grams per pizza - -MARGARITA_TOPPINGS = ["tomato sauce", "mozzarella cheese", "fresh basil"] -MUSHROOM_TOPPINGS = ["tomato sauce", "mozzarella cheese", "mushrooms"] - - -class Pizza: - dough: PizzaDough - num_pizzas: int = 1 - is_ready: bool = False - - def __init__(self, dough, num_pizza_balls): - if num_pizza_balls < 1: - raise ValueError("Number of pizza balls must be at least 1.") - self.num_pizzas = num_pizza_balls - self.dough = dough - self.make_pizza_balls() - - def make_pizza_balls(self): - self.weight_per_pizza_ball = self.dough.total_weight / self.num_pizzas - print( - f"Each Pizza will be made out of {self.weight_per_pizza_ball} g dough.\n..." - ) - print("Now imagine expert pizza tossing skills!\n...") - return self - - def add_toppings(self, toppings): - self.toppings = toppings - print(f"Adding {self.toppings} to pizza(s).\n...") - return self - - -def make_margarita_pizza_more_readable(num_pizzas: int = 1): - dough = make_pizza_dough(num_pizzas) - baked_pizza = make_and_bake_pizza(dough, num_pizzas, MARGARITA_TOPPINGS) - return baked_pizza - - -def make_pizza_dough(num_pizzas: int = 1): - dough = PizzaDough( - flour_weight=STANDARD_FLOUR_WEIGHT * num_pizzas, - water_weight=STANDARD_WATER_WEIGHT * num_pizzas, - salt_weight=STANDARD_SALT_WEIGHT * num_pizzas, - yeast_weight=STANDARD_YEAST_WEIGHT * num_pizzas, - ) - return dough - - -def make_and_bake_pizza(dough, num_pizzas, toppings): - pizza = Pizza(dough=dough, num_pizza_balls=num_pizzas) - pizza.add_toppings(toppings) - baked_pizza = bake_pizza(pizza) - return baked_pizza - - -def make_pizza_reusable(num_pizzas, toppings): - dough = make_pizza_dough(num_pizzas) - baked_pizza = make_and_bake_pizza(dough, num_pizzas, toppings) - return baked_pizza - - -def pizza_tasting_menu(): - all_pizzas = [] - - margarita_pizza = make_pizza_reusable(num_pizzas=1, toppings=MARGARITA_TOPPINGS) - all_pizzas.append(margarita_pizza) - - mushroom_pizza = make_pizza_reusable(num_pizzas=2, toppings=MUSHROOM_TOPPINGS) - all_pizzas.append(mushroom_pizza) - - return all_pizzas