From e7b4d8ee6ac045ab0430a194c175676fcb2087d9 Mon Sep 17 00:00:00 2001 From: dianayule Date: Wed, 6 May 2026 18:14:38 +0200 Subject: [PATCH 1/2] Lab done --- lab-python-functions.ipynb | 403 ++++++++++++++++++++++++++++++++++++- 1 file changed, 400 insertions(+), 3 deletions(-) diff --git a/lab-python-functions.ipynb b/lab-python-functions.ipynb index 44d337b..1defd03 100644 --- a/lab-python-functions.ipynb +++ b/lab-python-functions.ipynb @@ -43,13 +43,410 @@ "\n", "\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "01b84b29-3909-45c9-b7ce-b379f362b632", + "metadata": {}, + "outputs": [], + "source": [ + "#1. Define a function named initialize_inventory that takes products as a parameter. \n", + "#Inside the function, implement the code for initializing the inventory dictionary using \n", + "#a loop and user input." + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "id": "0bb8b09c-5cf5-4047-9c5f-67bc4e8f30a7", + "metadata": {}, + "outputs": [], + "source": [ + "def initialize_inventory(products):\n", + " inventory={}\n", + " products=products.split(\",\")\n", + " prod_list=list(products)\n", + " for item in prod_list: \n", + " quant=int(input(f\"Enter the quantity of the product {item}, only integers allowed\"))\n", + " inventory[item]=quant\n", + " return inventory" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "id": "1250b77b-2df9-4034-aa11-372445bc5758", + "metadata": {}, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter the quantity of the product mug, only integers allowed 2\n", + "Enter the quantity of the product hat, only integers allowed 2\n", + "Enter the quantity of the product boods, only integers allowed 2\n", + "Enter the quantity of the product pc, only integers allowed 2\n", + "Enter the quantity of the product pen, only integers allowed 2\n" + ] + }, + { + "data": { + "text/plain": [ + "({'mug': 2, ' hat': 2, ' boods': 2, ' pc': 2, ' pen': 2},\n", + " ['mug', ' hat', ' boods', ' pc', ' pen'])" + ] + }, + "execution_count": 95, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "initialize_inventory(\"mug, hat, boods, pc, pen\")" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "id": "6d56e991-8849-4126-a678-1e5ad1610dd8", + "metadata": {}, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter the quantity of the product mug, only integers allowed 2\n", + "Enter the quantity of the product hat, only integers allowed 4\n", + "Enter the quantity of the product boods, only integers allowed 2\n", + "Enter the quantity of the product pc, only integers allowed 1\n", + "Enter the quantity of the product pen, only integers allowed 3\n" + ] + } + ], + "source": [ + "inventory = initialize_inventory(\"mug, hat, boods, pc, pen\")" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "id": "e3d4e0b9-919a-4c7b-9a6f-2373e0c21166", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'mug': -1, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}" + ] + }, + "execution_count": 128, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "inventory" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "id": "bee86f98-08f5-4c15-9f4c-750db825ef21", + "metadata": {}, + "outputs": [], + "source": [ + "#2. Define a function named get_customer_orders that takes no parameters. Inside the function, \n", + "#implement the code for prompting the user to enter the product names using a loop. The function \n", + "#should return the customer_orders set." + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "id": "a372b134-ca8e-4ecc-89e2-0bd912c4ba02", + "metadata": {}, + "outputs": [], + "source": [ + "def get_customer_orders():\n", + " add=1\n", + " customer_orders=set()\n", + " while add==1:\n", + " order_item=input(f\"The producst we have are : {\" \".join(list(inventory.keys()))}.\\nEnter the name of the product you want:\")\n", + " customer_orders.add(order_item)\n", + " more=1\n", + " while more==1:\n", + " add_item=input(\"Do you want add more items? answer yes/no:\")\n", + " if add_item==\"yes\":\n", + " more=0\n", + " add=1\n", + " elif add_item==\"no\":\n", + " add=0\n", + " more=0\n", + " else:\n", + " more=1\n", + " return customer_orders\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "id": "338244f5-b9dd-49ae-aede-d2964f8c2f16", + "metadata": {}, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "The producst we have are : mug hat boods pc pen.\n", + "Enter the name of the product you want: mug\n", + "Do you want add more items? answer yes/no: hat\n", + "Do you want add more items? answer yes/no: no\n" + ] + }, + { + "data": { + "text/plain": [ + "{'mug'}" + ] + }, + "execution_count": 131, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "customer_orders=get_customer_orders()\n", + "customer_orders" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1ef07739-aa10-48d2-8f05-ce6a6bdf061a", + "metadata": {}, + "outputs": [], + "source": [ + "#3. Define a function named update_inventory that takes customer_orders and inventory as parameters. \n", + "#Inside the function, implement the code for updating the inventory dictionary based on the customer orders." + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "id": "5a91b95a-eb86-4ba8-a93d-370b15167e23", + "metadata": {}, + "outputs": [], + "source": [ + "def update_inventory(customer_orders,inventory):\n", + " for i in customer_orders:\n", + " inventory[i]-=1\n", + " return inventory\n" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "id": "94f8913f-d728-4c73-874c-3d3666e45f2b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'mug': -2, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}" + ] + }, + "execution_count": 133, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "upd_inventory=update_inventory(customer_orders,inventory)\n", + "upd_inventory" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "id": "e60a206d-7ff2-4a37-b1ff-8e3c218803a8", + "metadata": {}, + "outputs": [], + "source": [ + "#Define a function named calculate_order_statistics that takes customer_orders and products as parameters. \n", + "#Inside the function, implement the code for calculating the order statistics (total products ordered, and \n", + "#percentage of unique products ordered). The function should return these values." + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "id": "f7251248-23e8-4203-8b79-c7a6bdb9924c", + "metadata": {}, + "outputs": [], + "source": [ + "def calculate_order_statistics(customer_orders,products):\n", + " products= inventory.values()\n", + " total_products_ordered= len(customer_orders)\n", + " count=0\n", + " for x in products:\n", + " count+=x\n", + " \n", + " perc_prod_ordered= (total_products_ordered/count)*100\n", + " return total_products_ordered, perc_prod_ordered\n" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "id": "ae5ae107-02af-4fdc-b1ad-944d162ddf2b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(1, 12.5)" + ] + }, + "execution_count": 135, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "calculate_order_statistics(customer_orders,products)" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "id": "ad22c752-51d9-4413-b342-bf66ee72ff48", + "metadata": {}, + "outputs": [], + "source": [ + "#Define a function named print_order_statistics that takes order_statistics as a parameter. \n", + "#Inside the function, implement the code for printing the order statistics." + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "id": "166248c8-babc-4515-bc99-949de0dcf264", + "metadata": {}, + "outputs": [], + "source": [ + "order_statistics=calculate_order_statistics(customer_orders,products)" + ] + }, + { + "cell_type": "code", + "execution_count": 137, + "id": "18f8c394-3977-478e-8b20-cf362c559b3b", + "metadata": {}, + "outputs": [], + "source": [ + "def print_order_statistics(order_statistics):\n", + " x=order_statistics[0]\n", + " y=order_statistics[1]\n", + " return (f\"the total of products ordered is :{x}, and the percentage of unique products ordered is; {y}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 138, + "id": "7a3c52b6-b492-4367-ae17-6beac6e350dc", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'the total of products ordered is :1, and the percentage of unique products ordered is; 12.5'" + ] + }, + "execution_count": 138, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "print_order_statistics(order_statistics)" + ] + }, + { + "cell_type": "code", + "execution_count": 139, + "id": "65a43291-0b01-4ada-b6c9-e81a240c6649", + "metadata": {}, + "outputs": [], + "source": [ + "#Define a function named `print_updated_inventory` that takes `inventory` as a parameter. \n", + "#Inside the function, implement the code for printing the updated inventory." + ] + }, + { + "cell_type": "code", + "execution_count": 140, + "id": "70cc51dc-dbbc-423d-9285-75a923565a06", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'mug': -2, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}\n" + ] + } + ], + "source": [ + "print(upd_inventory)" + ] + }, + { + "cell_type": "code", + "execution_count": 142, + "id": "35aed8df-2589-45b9-8812-da506e59a8d2", + "metadata": {}, + "outputs": [], + "source": [ + "def print_updated_inventory(inventory):\n", + " print(f\"the updated inventory is {inventory}\")\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 143, + "id": "27689d04-a2ea-49dd-8892-ff35e63c8f7d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "the updated inventory is {'mug': -2, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}\n" + ] + } + ], + "source": [ + "print_updated_inventory(upd_inventory)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c15f48c2-5950-46e0-bb98-94a5536a6ab5", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:base] *", "language": "python", - "name": "python3" + "name": "conda-base-py" }, "language_info": { "codemirror_mode": { @@ -61,7 +458,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.13.9" } }, "nbformat": 4, From 7710856a10f8961d03f609c27f17c652d6384ee9 Mon Sep 17 00:00:00 2001 From: dianayule Date: Thu, 7 May 2026 14:30:59 +0200 Subject: [PATCH 2/2] Added some fixes --- lab-python-functions.ipynb | 340 +++++++------------------------------ 1 file changed, 59 insertions(+), 281 deletions(-) diff --git a/lab-python-functions.ipynb b/lab-python-functions.ipynb index 1defd03..a7c812a 100644 --- a/lab-python-functions.ipynb +++ b/lab-python-functions.ipynb @@ -46,28 +46,25 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "01b84b29-3909-45c9-b7ce-b379f362b632", "metadata": {}, "outputs": [], "source": [ "#1. Define a function named initialize_inventory that takes products as a parameter. \n", "#Inside the function, implement the code for initializing the inventory dictionary using \n", - "#a loop and user input." - ] - }, - { - "cell_type": "code", - "execution_count": 94, - "id": "0bb8b09c-5cf5-4047-9c5f-67bc4e8f30a7", - "metadata": {}, - "outputs": [], - "source": [ + "#a loop and user input.\n", + "\n", "def initialize_inventory(products):\n", " inventory={}\n", " products=products.split(\",\")\n", - " prod_list=list(products)\n", - " for item in prod_list: \n", + " \n", + " n=0\n", + " for prod in products:\n", + " products[n]=prod.strip()\n", + " n+=1\n", + " \n", + " for item in products: \n", " quant=int(input(f\"Enter the quantity of the product {item}, only integers allowed\"))\n", " inventory[item]=quant\n", " return inventory" @@ -75,99 +72,15 @@ }, { "cell_type": "code", - "execution_count": 95, - "id": "1250b77b-2df9-4034-aa11-372445bc5758", - "metadata": {}, - "outputs": [ - { - "name": "stdin", - "output_type": "stream", - "text": [ - "Enter the quantity of the product mug, only integers allowed 2\n", - "Enter the quantity of the product hat, only integers allowed 2\n", - "Enter the quantity of the product boods, only integers allowed 2\n", - "Enter the quantity of the product pc, only integers allowed 2\n", - "Enter the quantity of the product pen, only integers allowed 2\n" - ] - }, - { - "data": { - "text/plain": [ - "({'mug': 2, ' hat': 2, ' boods': 2, ' pc': 2, ' pen': 2},\n", - " ['mug', ' hat', ' boods', ' pc', ' pen'])" - ] - }, - "execution_count": 95, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "initialize_inventory(\"mug, hat, boods, pc, pen\")" - ] - }, - { - "cell_type": "code", - "execution_count": 72, - "id": "6d56e991-8849-4126-a678-1e5ad1610dd8", - "metadata": {}, - "outputs": [ - { - "name": "stdin", - "output_type": "stream", - "text": [ - "Enter the quantity of the product mug, only integers allowed 2\n", - "Enter the quantity of the product hat, only integers allowed 4\n", - "Enter the quantity of the product boods, only integers allowed 2\n", - "Enter the quantity of the product pc, only integers allowed 1\n", - "Enter the quantity of the product pen, only integers allowed 3\n" - ] - } - ], - "source": [ - "inventory = initialize_inventory(\"mug, hat, boods, pc, pen\")" - ] - }, - { - "cell_type": "code", - "execution_count": 128, - "id": "e3d4e0b9-919a-4c7b-9a6f-2373e0c21166", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'mug': -1, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}" - ] - }, - "execution_count": 128, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "inventory" - ] - }, - { - "cell_type": "code", - "execution_count": 129, + "execution_count": 2, "id": "bee86f98-08f5-4c15-9f4c-750db825ef21", "metadata": {}, "outputs": [], "source": [ "#2. Define a function named get_customer_orders that takes no parameters. Inside the function, \n", "#implement the code for prompting the user to enter the product names using a loop. The function \n", - "#should return the customer_orders set." - ] - }, - { - "cell_type": "code", - "execution_count": 130, - "id": "a372b134-ca8e-4ecc-89e2-0bd912c4ba02", - "metadata": {}, - "outputs": [], - "source": [ + "#should return the customer_orders set.\n", + "\n", "def get_customer_orders():\n", " add=1\n", " customer_orders=set()\n", @@ -185,108 +98,36 @@ " more=0\n", " else:\n", " more=1\n", - " return customer_orders\n", - "\n", - "\n" + " return customer_orders" ] }, { "cell_type": "code", - "execution_count": 131, - "id": "338244f5-b9dd-49ae-aede-d2964f8c2f16", - "metadata": {}, - "outputs": [ - { - "name": "stdin", - "output_type": "stream", - "text": [ - "The producst we have are : mug hat boods pc pen.\n", - "Enter the name of the product you want: mug\n", - "Do you want add more items? answer yes/no: hat\n", - "Do you want add more items? answer yes/no: no\n" - ] - }, - { - "data": { - "text/plain": [ - "{'mug'}" - ] - }, - "execution_count": 131, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "customer_orders=get_customer_orders()\n", - "customer_orders" - ] - }, - { - "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "1ef07739-aa10-48d2-8f05-ce6a6bdf061a", "metadata": {}, "outputs": [], "source": [ "#3. Define a function named update_inventory that takes customer_orders and inventory as parameters. \n", - "#Inside the function, implement the code for updating the inventory dictionary based on the customer orders." - ] - }, - { - "cell_type": "code", - "execution_count": 132, - "id": "5a91b95a-eb86-4ba8-a93d-370b15167e23", - "metadata": {}, - "outputs": [], - "source": [ + "#Inside the function, implement the code for updating the inventory dictionary based on the customer orders.\n", + "\n", "def update_inventory(customer_orders,inventory):\n", " for i in customer_orders:\n", " inventory[i]-=1\n", - " return inventory\n" - ] - }, - { - "cell_type": "code", - "execution_count": 133, - "id": "94f8913f-d728-4c73-874c-3d3666e45f2b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'mug': -2, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}" - ] - }, - "execution_count": 133, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "upd_inventory=update_inventory(customer_orders,inventory)\n", - "upd_inventory" + " return inventory" ] }, { "cell_type": "code", - "execution_count": 84, + "execution_count": 4, "id": "e60a206d-7ff2-4a37-b1ff-8e3c218803a8", "metadata": {}, "outputs": [], "source": [ - "#Define a function named calculate_order_statistics that takes customer_orders and products as parameters. \n", + "# 4.Define a function named calculate_order_statistics that takes customer_orders and products as parameters. \n", "#Inside the function, implement the code for calculating the order statistics (total products ordered, and \n", - "#percentage of unique products ordered). The function should return these values." - ] - }, - { - "cell_type": "code", - "execution_count": 134, - "id": "f7251248-23e8-4203-8b79-c7a6bdb9924c", - "metadata": {}, - "outputs": [], - "source": [ + "#percentage of unique products ordered). The function should return these values.\n", + "\n", "def calculate_order_statistics(customer_orders,products):\n", " products= inventory.values()\n", " total_products_ordered= len(customer_orders)\n", @@ -295,148 +136,85 @@ " count+=x\n", " \n", " perc_prod_ordered= (total_products_ordered/count)*100\n", - " return total_products_ordered, perc_prod_ordered\n" - ] - }, - { - "cell_type": "code", - "execution_count": 135, - "id": "ae5ae107-02af-4fdc-b1ad-944d162ddf2b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(1, 12.5)" - ] - }, - "execution_count": 135, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "calculate_order_statistics(customer_orders,products)" + " return total_products_ordered, perc_prod_ordered" ] }, { "cell_type": "code", - "execution_count": 117, + "execution_count": 5, "id": "ad22c752-51d9-4413-b342-bf66ee72ff48", "metadata": {}, "outputs": [], "source": [ - "#Define a function named print_order_statistics that takes order_statistics as a parameter. \n", - "#Inside the function, implement the code for printing the order statistics." - ] - }, - { - "cell_type": "code", - "execution_count": 136, - "id": "166248c8-babc-4515-bc99-949de0dcf264", - "metadata": {}, - "outputs": [], - "source": [ - "order_statistics=calculate_order_statistics(customer_orders,products)" - ] - }, - { - "cell_type": "code", - "execution_count": 137, - "id": "18f8c394-3977-478e-8b20-cf362c559b3b", - "metadata": {}, - "outputs": [], - "source": [ + "# 5. Define a function named print_order_statistics that takes order_statistics as a parameter. \n", + "#Inside the function, implement the code for printing the order statistics.\n", + "\n", "def print_order_statistics(order_statistics):\n", " x=order_statistics[0]\n", " y=order_statistics[1]\n", - " return (f\"the total of products ordered is :{x}, and the percentage of unique products ordered is; {y}\")" + " return f\"the total of products ordered is :{x}, and the percentage of unique products ordered is; {y}\"" ] }, { "cell_type": "code", - "execution_count": 138, - "id": "7a3c52b6-b492-4367-ae17-6beac6e350dc", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'the total of products ordered is :1, and the percentage of unique products ordered is; 12.5'" - ] - }, - "execution_count": 138, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "print_order_statistics(order_statistics)" - ] - }, - { - "cell_type": "code", - "execution_count": 139, + "execution_count": 6, "id": "65a43291-0b01-4ada-b6c9-e81a240c6649", "metadata": {}, "outputs": [], "source": [ - "#Define a function named `print_updated_inventory` that takes `inventory` as a parameter. \n", - "#Inside the function, implement the code for printing the updated inventory." + "# 6. Define a function named `print_updated_inventory` that takes `inventory` as a parameter. \n", + "#Inside the function, implement the code for printing the updated inventory.\n", + "\n", + "def print_updated_inventory(inventory):\n", + " print(f\"the updated inventory is {inventory}\")" ] }, { "cell_type": "code", - "execution_count": 140, - "id": "70cc51dc-dbbc-423d-9285-75a923565a06", + "execution_count": 7, + "id": "c15f48c2-5950-46e0-bb98-94a5536a6ab5", "metadata": {}, "outputs": [ { - "name": "stdout", + "name": "stdin", "output_type": "stream", "text": [ - "{'mug': -2, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}\n" + "Enter the quantity of the product hat, only integers allowed 1\n", + "Enter the quantity of the product t-shirt, only integers allowed 4\n", + "Enter the quantity of the product book, only integers allowed 2\n", + "Enter the quantity of the product keyring, only integers allowed 3\n", + "The producst we have are : hat t-shirt book keyring.\n", + "Enter the name of the product you want: hat\n", + "Do you want add more items? answer yes/no: yes\n", + "The producst we have are : hat t-shirt book keyring.\n", + "Enter the name of the product you want: keyring\n", + "Do you want add more items? answer yes/no: no\n" ] - } - ], - "source": [ - "print(upd_inventory)" - ] - }, - { - "cell_type": "code", - "execution_count": 142, - "id": "35aed8df-2589-45b9-8812-da506e59a8d2", - "metadata": {}, - "outputs": [], - "source": [ - "def print_updated_inventory(inventory):\n", - " print(f\"the updated inventory is {inventory}\")\n", - " " - ] - }, - { - "cell_type": "code", - "execution_count": 143, - "id": "27689d04-a2ea-49dd-8892-ff35e63c8f7d", - "metadata": {}, - "outputs": [ + }, { "name": "stdout", "output_type": "stream", "text": [ - "the updated inventory is {'mug': -2, ' hat': 4, ' boods': 2, ' pc': 1, ' pen': 3}\n" + "the updated inventory is {'hat': 0, 't-shirt': 4, 'book': 2, 'keyring': 2}\n" ] } ], "source": [ - "print_updated_inventory(upd_inventory)" + "# 7. Call the functions in the appropriate sequence to execute the program and manage customer orders.\n", + "\n", + "products = \"hat, t-shirt, book, keyring\"\n", + "inventory = initialize_inventory(products)\n", + "customer_orders = get_customer_orders()\n", + "inventory = update_inventory(customer_orders,inventory)\n", + "order_statistics = calculate_order_statistics(customer_orders,products)\n", + "print_order_statistics(order_statistics)\n", + "print_updated_inventory(inventory)" ] }, { "cell_type": "code", "execution_count": null, - "id": "c15f48c2-5950-46e0-bb98-94a5536a6ab5", + "id": "ef2e4db9-6fd9-40ea-9562-dec53541511f", "metadata": {}, "outputs": [], "source": []