def run_homework(): first_order = generate_order() print(first_order) print(f"Liczba elementów w zamówieniu: {len(first_order)}") second_order = generate_order() print(second_order) print(f"Liczba elementów w zamówieniu: {len(second_order)}")
def run_homework(): order_over_limit = generate_order(10) print(order_over_limit) cookie = Product(name="Ciastko", category_name="Jedzenie", unit_price=4) order_below_limit = generate_order(2) order_below_limit.add_product_to_order(cookie, quantity=10) print(order_below_limit) order_over_limit.add_product_to_order(cookie, quantity=10) print(order_over_limit)
def run_homework(): first_order = generate_order(10) print(first_order) second_order = generate_order(2) print(second_order) cookies = Product(name="Cookies", category_name="Food", unit_price=5) first_order.add_product_to_order(cookies, quantity=1) print(first_order) second_order.add_product_to_order(cookies, quantity=10) print(second_order) second_order.add_product_to_order(cookies, quantity=5) print(second_order)
def run_homework(): green_apple = Apple(species_name="Green", size="M", price=3.5) red_apple = Apple(species_name="Red", size="S", price=2.8) print(green_apple.species_name, green_apple) print(red_apple.species_name, red_apple) old_potato = Potato(species_name="Potato Old", size="S", price=1.55) print(old_potato.species_name, old_potato) first_order = generate_order() print_order(first_order) second_order = generate_order() print_order(second_order)
def run_homework(): first_order = generate_order() print(first_order) cookie = Product(name="Ciastko", category_name="Jedzenie", unit_price=4) first_order.add_product_to_order(cookie, quantity=10) print(first_order)
from shop.apple import Apple from shop.order import generate_order if __name__ == '__main__': order_one = generate_order() print(order_one) green_apple = Apple("Ladne jabłka", "L", 6) print(green_apple.calculate_price(6))
def run_homework(): first_order = generate_order() print(first_order) second_order = generate_order() print(second_order)
def run_homework(): first_order = generate_order() first_order.print_self() second_order = generate_order() second_order.print_self()