|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "code", |
| 5 | + "execution_count": 14, |
| 6 | + "id": "25fff47a-0a42-4a1a-b0ec-e314a8d4fe4e", |
| 7 | + "metadata": {}, |
| 8 | + "outputs": [ |
| 9 | + { |
| 10 | + "name": "stdout", |
| 11 | + "output_type": "stream", |
| 12 | + "text": [ |
| 13 | + "Your Ordered a Large Pizza: \n", |
| 14 | + " - large\n", |
| 15 | + "You Ordered a Pizaa with toping:\n", |
| 16 | + "-oliva\n", |
| 17 | + "-pioneer\n", |
| 18 | + "{'delivery': True, 'Tip': 5}\n", |
| 19 | + "Details of the items are: \n", |
| 20 | + "- delivery: True\n", |
| 21 | + "- Tip: 5\n" |
| 22 | + ] |
| 23 | + } |
| 24 | + ], |
| 25 | + "source": [ |
| 26 | + "def pizza(size,*toping,**details):\n", |
| 27 | + " print(\"Your Ordered a Large Pizza: \\n -\",size)\n", |
| 28 | + " print(\"You Ordered a Pizaa with toping:\")\n", |
| 29 | + " for top in toping:\n", |
| 30 | + " print(f\"-{top}\")\n", |
| 31 | + " print(details)\n", |
| 32 | + " print(\"Details of the items are: \")\n", |
| 33 | + " for key,value in details.items():\n", |
| 34 | + " print(f\"- {key}: {value}\")\n", |
| 35 | + "\n", |
| 36 | + "pizza(\"large\",\"oliva\",\"pioneer\",delivery=True, Tip = 5)" |
| 37 | + ] |
| 38 | + }, |
| 39 | + { |
| 40 | + "cell_type": "code", |
| 41 | + "execution_count": null, |
| 42 | + "id": "7162dd6e-e4fc-41cc-8fa7-baea7e70674c", |
| 43 | + "metadata": {}, |
| 44 | + "outputs": [], |
| 45 | + "source": [] |
| 46 | + } |
| 47 | + ], |
| 48 | + "metadata": { |
| 49 | + "kernelspec": { |
| 50 | + "display_name": "Python 3 (ipykernel)", |
| 51 | + "language": "python", |
| 52 | + "name": "python3" |
| 53 | + }, |
| 54 | + "language_info": { |
| 55 | + "codemirror_mode": { |
| 56 | + "name": "ipython", |
| 57 | + "version": 3 |
| 58 | + }, |
| 59 | + "file_extension": ".py", |
| 60 | + "mimetype": "text/x-python", |
| 61 | + "name": "python", |
| 62 | + "nbconvert_exporter": "python", |
| 63 | + "pygments_lexer": "ipython3", |
| 64 | + "version": "3.11.4" |
| 65 | + } |
| 66 | + }, |
| 67 | + "nbformat": 4, |
| 68 | + "nbformat_minor": 5 |
| 69 | +} |
0 commit comments