diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..7be5be68 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ + +**/venv/ +**/.idea/ + +**/__pycache__/ + +**/*.pyc + +**/build/ +**/dist/ +**/*.egg-info + +**/.ipynb_checkpoints/ + diff --git a/README.md b/README.md index 8cb84dc0..51958b3c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,5 @@ # Python-programming-exercises -100+ Python challenge programming exercises. +Solutions to the [100+ Python challenge programming exercises](https://github.com/zhiwehu/Python-programming-exercises/blob/master/100+%20Python%20challenging%20programming%20exercises%20for%20Python%203.md). -## 100+ Python Projects Challenge -https://github.com/zhiwehu/100_plus_Python_Projects_Challenge - -## Python comic - -Hey guys I just created a comic for learning Python if you like you could see it from here: https://aicodeplayer.com -For now I just use Chinese if you like I could use English as well. - -![Python Comic](https://github.com/zhiwehu/Python-programming-exercises/blob/master/comic.png?raw=true) diff --git a/comic.png b/comic.png deleted file mode 100644 index 2ff864e7..00000000 Binary files a/comic.png and /dev/null differ diff --git a/python contents.docx b/python contents.docx deleted file mode 100644 index 184715d8..00000000 Binary files a/python contents.docx and /dev/null differ diff --git a/solutions/exercises_01-10.ipynb b/solutions/exercises_01-10.ipynb new file mode 100644 index 00000000..55a7046b --- /dev/null +++ b/solutions/exercises_01-10.ipynb @@ -0,0 +1,786 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "93c2bae4-3841-40bb-8b05-6d2bec141e35", + "metadata": {}, + "source": [ + "# Solutions to some Python Practice Problems" + ] + }, + { + "cell_type": "markdown", + "id": "96f07ae3-7042-4b2e-b65b-41241e0116c9", + "metadata": {}, + "source": [ + "This notebook and some more following this contains solutions to problems described at [Python Programming Exercises](https://github.com/zhiwehu/Python-programming-exercises/blob/master/100+%20Python%20challenging%20programming%20exercises%20for%20Python%203.md). In particular, this notebook contains solution to [Problem-01](https://github.com/Nishant-Mishra/Python-programming-exercises/blob/master/100+%20Python%20challenging%20programming%20exercises%20for%20Python%203.md#question-1) to [Problem-10](https://github.com/Nishant-Mishra/Python-programming-exercises/blob/master/100+%20Python%20challenging%20programming%20exercises%20for%20Python%203.md#question-10)\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "8632fd25-5f0a-4780-b83d-73b988d73c81", + "metadata": {}, + "source": [ + "## Problem 01" + ] + }, + { + "cell_type": "code", + "execution_count": 122, + "id": "8a6ab104-0663-48a3-beed-9e3a866437c4", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_01():\n", + " \"\"\"Write a program which will find all such numbers which are divisible by 7 \n", + " but are not a multiple of 5, between 2000 and 3200 (both included). \n", + " The numbers obtained should be printed in a comma-separated sequence on a single line.\n", + " \"\"\"\n", + " \n", + " print(\", \".join([str(x) for x in range(2000, 3200 + 1) if x % 5 and not x % 7])) " + ] + }, + { + "cell_type": "markdown", + "id": "aa3c9885-7891-4807-ac4b-2b0c5d7815f4", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> **Step 1**: Iterate from `start` (= 2000) to `stop` (= 3200). To include 3200, use `3200 + 1` as the `stop` \n", + "> **Step 2**: Filter out numbers (`x`) which are multiple of 7 (i.e. `x % 7` => 0) and which are not multiple of 5 (i.e. `x % 5` != 0) \n", + "> **Step 3**: To do this in **Pythonic** way, combine the 2 steps to form a **List Comprehension** \n", + "> **Step 4**: To print it as comma separated list, use `str.join()` method to concatenate list elements to form a string. \n", + "> **Step 5** (A Catch): `join` accepts iterable of string, hence call `str()` on the list element in the comprehension. " + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "id": "d9f5c1dd-2e9e-4491-aa17-53aac655b6e2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2002, 2009, 2016, 2023, 2037, 2044, 2051, 2058, 2072, 2079, 2086, 2093, 2107, 2114, 2121, 2128, 2142, 2149, 2156, 2163, 2177, 2184, 2191, 2198, 2212, 2219, 2226, 2233, 2247, 2254, 2261, 2268, 2282, 2289, 2296, 2303, 2317, 2324, 2331, 2338, 2352, 2359, 2366, 2373, 2387, 2394, 2401, 2408, 2422, 2429, 2436, 2443, 2457, 2464, 2471, 2478, 2492, 2499, 2506, 2513, 2527, 2534, 2541, 2548, 2562, 2569, 2576, 2583, 2597, 2604, 2611, 2618, 2632, 2639, 2646, 2653, 2667, 2674, 2681, 2688, 2702, 2709, 2716, 2723, 2737, 2744, 2751, 2758, 2772, 2779, 2786, 2793, 2807, 2814, 2821, 2828, 2842, 2849, 2856, 2863, 2877, 2884, 2891, 2898, 2912, 2919, 2926, 2933, 2947, 2954, 2961, 2968, 2982, 2989, 2996, 3003, 3017, 3024, 3031, 3038, 3052, 3059, 3066, 3073, 3087, 3094, 3101, 3108, 3122, 3129, 3136, 3143, 3157, 3164, 3171, 3178, 3192, 3199\n" + ] + } + ], + "source": [ + "solution_01()" + ] + }, + { + "cell_type": "markdown", + "id": "4c031460-990d-4428-9f91-ac5a411fc5a6", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "7f46e823-3973-465f-8099-6ffe93e3206c", + "metadata": {}, + "source": [ + "## Problem 02" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "id": "7273bc4b-fecd-4e80-bbb3-450478ac1b77", + "metadata": {}, + "outputs": [], + "source": [ + "from math import factorial\n", + "\n", + "def solution_02():\n", + " \"\"\"Write a program which can compute the factorial of a given numbers. \n", + " The results should be printed in a comma-separated sequence on a single line. \n", + " Suppose the following input is supplied to the program: 8 Then, the output should be: 40320\n", + " \"\"\"\n", + " num = int(input(\"Factorial for: \"))\n", + " print(factorial(num)) " + ] + }, + { + "cell_type": "markdown", + "id": "1e7be47e-5bd9-4f17-b2d1-519693bcb0b9", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> _No explanation needed_" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "id": "972645b7-d564-4ac8-bac7-c30437f0bb49", + "metadata": {}, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Factorial for: 100\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000\n" + ] + } + ], + "source": [ + "solution_02()" + ] + }, + { + "cell_type": "markdown", + "id": "86559d65-1ffb-4f36-8e24-287230ec3dc1", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "8d0465ef-98f0-4eb7-a7a6-4fbac3ecd639", + "metadata": {}, + "source": [ + "## Problem 03" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "id": "321f033d-83b3-407f-a8bf-5a47d188ea9a", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_03(n: int):\n", + " \"\"\"With a given integral number n, write a program to generate a dictionary \n", + " that contains (i, i*i) such that is an integral number between 1 and n (both included). \n", + " and then the program should print the dictionary. Suppose the following input \n", + " is supplied to the program: 8 Then, the output should be: \n", + " {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64}\n", + " \"\"\"\n", + " print({i: i*i for i in range(1, n+1)})" + ] + }, + { + "cell_type": "markdown", + "id": "07e8dd89-fa19-44bc-bb56-9d68d7ca52a2", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> **Step 1**: Use for loop to iterate over the given range and create the dictionary as asked in question. \n", + "> **Step 2**: Convert the for loop into `dictionary comprehension` and print it !! " + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "id": "ed25894d-f206-44fb-b19f-279f6e88fae3", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64}\n" + ] + } + ], + "source": [ + "solution_03(8)" + ] + }, + { + "cell_type": "markdown", + "id": "9fc248c7-72ff-4ab0-9603-e77d91b14d36", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "eedd1827-2bbc-4881-9864-115bb32cb89f", + "metadata": {}, + "source": [ + "## Problem 04" + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "id": "f5893674-449c-49c6-a056-a7a38fcc6a27", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_04():\n", + " \"\"\"Write a program which accepts a sequence of comma-separated \n", + " numbers from console and generate a list and a tuple which contains \n", + " every number. Suppose the following input is supplied to the \n", + " program: 34,67,55,33,12,98 Then, the output should be: \n", + " ['34', '67', '55', '33', '12', '98'] ('34', '67', '55', '33', '12', '98')\n", + " \"\"\"\n", + " seq = input(\"Input sequence: \")\n", + " print((l := seq.split(',')), tuple(l))" + ] + }, + { + "cell_type": "markdown", + "id": "343c7783-c4e7-412f-bf7d-ac6325bc6ddd", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> **Step 1**: Get the input \n", + "> **Step 2**: Assuming that the numbers shall be separated only by ',', i.e. no trailing/leading spaces, use `str.split()` to split the input string into a list of numbers. \n", + "> **Step 3**: Create a tuple from above list by calling `tuple()` on the list. \n", + "> **Step 4**: Using the feature of `print()` that ','-separated arguments are printed and separated with single 'space', print the list and the tuple \n", + "> **Step 5**: To optimize further, use 'assignment expressions' (PEP 572) a to create and store the list while printing it. And then call `tuple()` on stored instance while printing. " + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "id": "f5fad5db-c2f0-4923-80ec-888d75d94d38", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Input sequence: 34,67,55,33,12,98\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['34', '67', '55', '33', '12', '98'] ('34', '67', '55', '33', '12', '98')\n" + ] + } + ], + "source": [ + "solution_04()" + ] + }, + { + "cell_type": "markdown", + "id": "db53ffea-050d-449d-9d85-e93e2d7ae873", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "210fa9b7-06e2-4e8f-8ffc-aadcd70326b2", + "metadata": {}, + "source": [ + "## Problem 05" + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "id": "37195ba7-db63-4a60-b091-3a93eddd3d2d", + "metadata": {}, + "outputs": [], + "source": [ + "class String:\n", + " \n", + " def __init__(self):\n", + " self._str = ''\n", + " \n", + " def getString(self):\n", + " self._str = input(\"Input str: \")\n", + " \n", + " def printString(self):\n", + " print(self._str)\n", + "\n", + "\n", + "def solution_05():\n", + " \"\"\"Define a class which has at least two methods: \n", + " getString: to get a string from console input \n", + " printString: to print the string in upper case. \n", + " Also please include simple test function to test the class methods.\n", + " \"\"\"\n", + " strobj = String()\n", + " strobj.getString()\n", + " strobj.printString()" + ] + }, + { + "cell_type": "markdown", + "id": "0c3d4ace-e2a2-4c51-bd5e-6e3989c44996", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> _No explanation needed_" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "id": "78fae7b0-b36b-47dd-945d-2a54fc56e3c7", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Input str: Love you !!\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Love you !!\n" + ] + } + ], + "source": [ + "solution_05()" + ] + }, + { + "cell_type": "markdown", + "id": "5479dbab-2c40-478d-8135-21609353d266", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "0c2df95e-d1d4-4df6-a9a6-a2286364786c", + "metadata": {}, + "source": [ + "## Problem 06" + ] + }, + { + "cell_type": "code", + "execution_count": 138, + "id": "702ac667-e2f6-420b-a1b9-d243279fd080", + "metadata": {}, + "outputs": [], + "source": [ + "from math import sqrt\n", + "\n", + "def solution_06():\n", + " \"\"\"Write a program that calculates and prints the value according to the given formula: \n", + " Q = Square root of [(2 * C * D)/H] \n", + " Following are the fixed values of C and H: C is 50. H is 30. \n", + " D is the variable whose values should be input to your program in a comma-separated sequence. \n", + " Example: Let us assume the following comma separated input sequence is given to the \n", + " program: 100,150,180 The output of the program should be: 18,22,24\n", + " \"\"\"\n", + " d_str = input(\"Enter list: \").split(',')\n", + " print(\",\".join([str(int(round(sqrt((2 * 50 * int(d)) / 30)))) for d in d_str]))\n" + ] + }, + { + "cell_type": "markdown", + "id": "ae943a5f-bb03-44b9-943c-fbb75b9c318f", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> Following is the solution in expanded form\n", + "```\n", + " c = 50\n", + " h = 30\n", + " d_str = input(\"Enter list: \")\n", + " d_list = d_str.split(',')\n", + " \n", + " ans = []\n", + " for d in d_list:\n", + " q = sqrt((2 * c * int(d)) / h)\n", + " ans.append(str(int(round(q)))\n", + " \n", + " print(\",\".join(ans))\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 140, + "id": "cb930190-9ed1-4822-9b57-81d124f1ead3", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter list: 100,150,180\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "18,22,24\n" + ] + } + ], + "source": [ + "solution_06()" + ] + }, + { + "cell_type": "markdown", + "id": "bfa63d05-f372-465d-92cc-f775c885c5d7", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "0f3ceb61-ae97-46d5-bf85-c7109883de14", + "metadata": {}, + "source": [ + "## Problem 07" + ] + }, + { + "cell_type": "code", + "execution_count": 141, + "id": "6c78a90b-5331-47c4-8aad-33365edd65ed", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_07():\n", + " \"\"\"Write a program which takes 2 digits: X,Y as input and generates a 2-dimensional array.\n", + " The element value in the i-th row and j-th column of the array should be i*j. Note: i=0,1...,X-1; j=0,1,...,Y-1.\n", + " Example: Suppose the following inputs are given to the program: 3,5 \n", + " Then, the output of the program should be: [[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]]\n", + " \"\"\"\n", + " x, y = input(\"Enter numbers: \").split(',')\n", + " print([[i * j for j in range(int(y))] for i in range(int(x))])\n" + ] + }, + { + "cell_type": "markdown", + "id": "d4e741fc-d9ac-4a06-ba5f-80329726a532", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> Solution in expanded form:\n", + "```\n", + " xy_str = input(\"Enter numbers: \")\n", + " xy_list = xy_str.split(',')\n", + " x = int(xy_list[0])\n", + " y = int(xy_list[1])\n", + "\n", + " l1 = []\n", + " for i in range(x):\n", + " l2 = []\n", + " for j in range(y):\n", + " l2.append(i*j)\n", + " l1.append(l2)\n", + " \n", + " print(l1)\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 142, + "id": "3681e166-b154-46be-89b7-f28d51d6bb81", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter numbers: 9, 5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8], [0, 3, 6, 9, 12], [0, 4, 8, 12, 16], [0, 5, 10, 15, 20], [0, 6, 12, 18, 24], [0, 7, 14, 21, 28], [0, 8, 16, 24, 32]]\n" + ] + } + ], + "source": [ + "solution_07()" + ] + }, + { + "cell_type": "markdown", + "id": "6f7434c2-425a-43b6-b55e-b196ba178c73", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "36026b54-0a8e-4f51-bf38-e178d50c9040", + "metadata": {}, + "source": [ + "## Problem 08" + ] + }, + { + "cell_type": "code", + "execution_count": 143, + "id": "549af1c7-55c2-4097-92ae-554dc9b621ed", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_08():\n", + " \"\"\"Write a program that accepts a comma separated sequence of words as input \n", + " and prints the words in a comma-separated sequence after sorting them alphabetically. \n", + " Suppose the following input is supplied to the program: without,hello,bag,world Then, the output should be: bag,hello,without,world\n", + " \"\"\"\n", + " words = input(\"Enter words: \").split(',')\n", + " print(\",\".join(sorted(words)))\n" + ] + }, + { + "cell_type": "markdown", + "id": "8ae8729e-71d0-4016-8d2e-9b92d2af77ae", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> Use builtin `sorted()` function to sort the words in ascending order of alphabet" + ] + }, + { + "cell_type": "code", + "execution_count": 144, + "id": "23a15ab7-14a6-4d38-8c3e-77b1bff5bb69", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter words: without,hello,bag,world\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bag,hello,without,world\n" + ] + } + ], + "source": [ + "solution_08()" + ] + }, + { + "cell_type": "markdown", + "id": "a374f509-b90e-465d-8ef4-8633a96ef0c0", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "9a73dd57-d723-4705-800f-9263b5eaf9c7", + "metadata": {}, + "source": [ + "## Problem 09" + ] + }, + { + "cell_type": "code", + "execution_count": 145, + "id": "223d694b-57d5-4ef5-b7b1-3df26006d7a5", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_09():\n", + " \"\"\"Write a program that accepts sequence of lines as input and prints the lines\n", + " after making all characters in the sentence capitalized. Suppose the following input\n", + " is supplied to the program: Hello world Practice makes perfect.\n", + " Then, the output should be: HELLO WORLD PRACTICE MAKES PERFECT\n", + " \"\"\"\n", + " sentence = input(\"Enter sentence: \")\n", + " print(sentence.upper())\n" + ] + }, + { + "cell_type": "markdown", + "id": "54479f70-651e-4e46-b090-f66976232d2a", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> Use `str.upper()` to change case to upper of each alphabet. Rest characters are left as it is." + ] + }, + { + "cell_type": "code", + "execution_count": 146, + "id": "72ce67ce-ffed-450b-a573-602cd750d520", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter sentence: Hello world Practice makes perfect\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HELLO WORLD PRACTICE MAKES PERFECT\n" + ] + } + ], + "source": [ + "solution_09()" + ] + }, + { + "cell_type": "markdown", + "id": "02f7d817-e982-46ad-a615-bc203eebc87e", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "id": "e3538b44-17a1-4070-8461-fa3c36e3fd8b", + "metadata": {}, + "source": [ + "## Problem 10" + ] + }, + { + "cell_type": "code", + "execution_count": 147, + "id": "4df9a415-2955-4c87-96e7-0bc4b50767a3", + "metadata": {}, + "outputs": [], + "source": [ + "def solution_10():\n", + " \"\"\"Write a program that accepts a sequence of whitespace separated words as input \n", + " and prints the words after removing all duplicate words and sorting them alphanumerically. \n", + " Suppose the following input is supplied to the program: hello world and practice makes perfect and hello world again. \n", + " Then, the output should be: again and hello makes perfect practice world\n", + " \"\"\"\n", + " words = input(\"Enter sentence: \").split()\n", + " print(\" \".join(sorted(list(set(words)))))\n" + ] + }, + { + "cell_type": "markdown", + "id": "82307cd7-e452-4d31-81c2-f59c8d54e8a2", + "metadata": {}, + "source": [ + "### Solution Explanation\n", + "> The `set` data structure cannot contain duplicates. Hence convert the words `list` to a `set` and then back to `list` and then apply `sorted()` to sort alphanumerically." + ] + }, + { + "cell_type": "code", + "execution_count": 148, + "id": "d2117df5-8ddf-46a5-933b-dd7084f7a7c9", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdin", + "output_type": "stream", + "text": [ + "Enter sentence: hello world and practice makes perfect and hello world again\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "again and hello makes perfect practice world\n" + ] + } + ], + "source": [ + "solution_10()" + ] + }, + { + "cell_type": "markdown", + "id": "64dbf053-4aa1-49f9-bb0f-4248ae34848b", + "metadata": {}, + "source": [ + " " + ] + }, + { + "cell_type": "markdown", + "id": "be7dfba9-2e5a-4210-98f9-b92ec8308213", + "metadata": {}, + "source": [ + "\n", + "---\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}