adds badly formatted version of file

This commit is contained in:
Pamela Hathway 2025-09-22 16:54:24 +03:00
parent 9d29bcbd51
commit 090f388efb

View file

@ -1,18 +1,15 @@
import numpy as np
from italianfood.dough import PizzaDough from italianfood.dough import PizzaDough
from italianfood.ovens import bake_pizza from italianfood.ovens import bake_pizza
import numpy as np
pizzaName = "Hello pizza" import time
pizzaName='Hello pizza'
class Pizza: class Pizza:
dough: PizzaDough dough: PizzaDough
num_pizzas: int = 1 num_pizzas: int = 1
is_ready: bool = False is_ready: bool = False
some_array: np.ndarray | None = None some_array: np.ndarray | None = None
def __init__(self, dough, num_pizza_balls): def __init__(self, dough, num_pizza_balls):
if num_pizza_balls < 1: if num_pizza_balls < 1:
raise ValueError("Number of pizza balls must be at least 1.") raise ValueError("Number of pizza balls must be at least 1.")
@ -27,40 +24,35 @@ class Pizza:
) )
print("Now imagine expert pizza tossing skills!\n...") print("Now imagine expert pizza tossing skills!\n...")
return self
return self
def add_toppings(self, toppings): def add_toppings(self, toppings):
self.toppings = toppings self.toppings = toppings
print(f"Adding {self.toppings} to pizza(s).\n...") print(f"Adding {self.toppings} to pizza(s).\n...")
return self return self
def make_margherita_pizza(num_pizzas: int = 1): def make_margherita_pizza(num_pizzas: int = 1):
total_flour_weight=180* num_pizzas total_flour_weight=180* num_pizzas
total_water_weight= 126 *num_pizzas total_water_weight= 126 *num_pizzas
total_salt_weight = 2*num_pizzas total_salt_weight = 2*num_pizzas
total_yeast_weight =1 *num_pizzas total_yeast_weight =1 *num_pizzas
dough = PizzaDough(flour_weight=total_flour_weight,water_weight=total_water_weight,salt_weight=total_salt_weight,yeast_weight=total_yeast_weight)
dough = PizzaDough(
flour_weight=total_flour_weight,
water_weight=total_water_weight,
salt_weight=total_salt_weight,
yeast_weight=total_yeast_weight,
)
toppings = ["tomato sauce", "mozzarella cheese", "fresh basil"] toppings = ["tomato sauce", "mozzarella cheese", "fresh basil"]
pizza = Pizza(dough=dough, num_pizza_balls=num_pizzas)
pizza.add_toppings(toppings)
pizza = Pizza(dough=dough,
num_pizza_balls=num_pizzas)
pizza.add_toppings(toppings)
baked_pizza = bake_pizza(pizza) baked_pizza = bake_pizza(pizza)
return baked_pizza return baked_pizza
import pandas
df = pandas.DataFrame(
{"col_a": [i for i in range(20)], "col_b": [j for j in range(20, 40)]}
)
df.drop(columns="col_b", inplace=True)