{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Python Refresher (do check out __[Python docs](https://docs.python.org/3/reference/)__[Python docs]\n",
    "## Alot of this notebook demo uses content from __[w3schools python tutorial]https://www.w3schools.com/python/default.asp__[Python docs]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Outputting\n",
    "### Hello world!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "print() is a function in Python 3 - you need the parentheses.\n",
    "String literals are contained within either single or double quotes.\n",
    "This is handy when you want to output a single quote or vice-versa"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world!\n",
      "hello world!\n",
      "'lo world and all who live there!\n"
     ]
    }
   ],
   "source": [
    "# this is a comment and the next line outputs a string of characters\n",
    "print('hello world!')\n",
    "#so does this\n",
    "print(\"hello world!\")\n",
    "print(\"'lo world and all who live there!\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "Missing parentheses in call to 'print'. Did you mean print(\"hello world\")? (4175599272.py, line 3)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  Cell \u001b[1;32mIn[2], line 3\u001b[1;36m\u001b[0m\n\u001b[1;33m    print \"hello world\"\u001b[0m\n\u001b[1;37m          ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m Missing parentheses in call to 'print'. Did you mean print(\"hello world\")?\n"
     ]
    }
   ],
   "source": [
    "#python 2 allowed no brackets  >> print \"hello world\"\n",
    "#python 3 doesn't.  Run this...\n",
    "print \"hello world\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We'll come back to strings in a minute after we recap on variables. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Variables and Built in Data Types\n",
    "Python is dynamically typed but not statically typed.\n",
    "\n",
    "### Variable Naming Rules:\n",
    "\n",
    "-  A variable can have a short name (like x and y) or a more descriptive name (velocity, partNo).\n",
    "\n",
    "-  A variable name must start with a letter or the underscore character\n",
    "\n",
    "-  A variable name cannot start with a number\n",
    "\n",
    "-  A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )\n",
    "\n",
    "-  Variable names are case-sensitive (age, Age and AGE are three different variables)\n",
    "\n",
    "### Numeric types are defined by assignment:-\n",
    "\n",
    "Integers\n",
    "x=4\n",
    "\n",
    "Floats\n",
    "y=4.0\n",
    "\n",
    "Complex\n",
    "z=4 + 3j\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x is 4 ,y is 4.0 and z is (4+3j)\n",
      "<class 'int'> <class 'float'> <class 'complex'>\n"
     ]
    }
   ],
   "source": [
    "#Integers\n",
    "x=4\n",
    "#Floats\n",
    "y=4.0\n",
    "#Complex\n",
    "z=4 + 3j\n",
    "print(\"x is\",x,\",y is\",y,\"and z is\",z)\n",
    "print(type(x),type(y),type(z))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "To find a variable's type call its type method (these built in types are actually classes!)\n",
    "### Boolean Values\n",
    "\n",
    "These always evaluate to True or False\n",
    "empty values, such as (), [], {}, \"\", the number 0, and the value None."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False True False False\n"
     ]
    }
   ],
   "source": [
    "a=''\n",
    "x=True\n",
    "y=False\n",
    "z=0\n",
    "print(bool(a),bool(x),bool(y),bool(z))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Summary of Built-in Data Types\n",
    "\n",
    "\n",
    "Python has the following data types built-in by default, in these categories:\n",
    "\n",
    "Text Type:\tstr\n",
    "\n",
    "Numeric Types:\tint, float, complex\n",
    "\n",
    "Sequence Types:\tlist, tuple, range\n",
    "\n",
    "Mapping Type:\tdict\n",
    "\n",
    "Set Types:\tset, frozenset\n",
    "\n",
    "Boolean Type:\tbool\n",
    "\n",
    "Binary Types:\tbytes, bytearray, memoryview"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "You can caste variables using syntax similar to C, etc."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3 <class 'int'>\n",
      "3.0 <class 'float'>\n",
      "3.0 <class 'complex'>\n"
     ]
    }
   ],
   "source": [
    "x=3\n",
    "print(x,type(x))\n",
    "y=float(x)\n",
    "print(y,type(y))\n",
    "z=complex(x)\n",
    "print(y,type(z))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Common Arithmetic and Logical Operators in Python\n",
    "\n",
    "\n",
    "Python recognises the following groups of operators\n",
    "\n",
    "### Arithmetic operators\n",
    "\n",
    " #### Assignment\n",
    " x = 5\n",
    " #### Increment by and assign\n",
    " x += 3\tequivalent to x = x + 3\t\n",
    " #### Decrement by  and assign\n",
    " x -= 3 equivalent to x = x - 3\t\n",
    " #### Multiply by and assign\n",
    " x *= 3 equivalent to x = x * 3\t\n",
    " #### Divide by and assign\n",
    " x /= 3 equivalent to x = x / 3\t\n",
    " #### Modular division (remainder)  and assign\n",
    " x %= 3 equivalent to x = x % 3\t\n",
    " #### Integer division and assign\n",
    " x //= 3 equivalent to x = x // 3\n",
    " #### Power and assign\n",
    " x \\*\\**= 3 equivalent to x = x \\*\\** 3\t\n",
    " #### Bitwise And and assign\n",
    " x &= 3 equivalent to x = x & 3\t\n",
    " #### Bitwise Or and assign\n",
    " x |= 3 equivalent to x = x | 3\t\n",
    " #### Bitwise ExOR and assign\n",
    " x ^= 3\tequivalent to x = x ^ 3\t\n",
    " #### Bitwise right shift and assign\n",
    " x >>= 3\tequivalent to x = x >> 3\t\n",
    " #### Bitwise left shift and assign\n",
    " x <<= 3\tequivalent to x = x << 3\n",
    " \n",
    " y = x + 3\t\n",
    " y = x - 3\t\n",
    " y = x * 3\t\n",
    " y = x / 3\t\n",
    " #### Modular division (remainder)\n",
    " y = x % 3\t\n",
    " #### Integer division\n",
    " y = x // 3\n",
    " #### Power\n",
    " y = x ** 3\t\n",
    " #### Bitwise And\n",
    " y = x & 3\t\n",
    " #### Bitwise Or\n",
    " y = x | 3\t\n",
    " #### Bitwise ExOr\n",
    " y= x ^ 3\t\n",
    " #### Bitwise right shift\n",
    " y x >> 3\t\n",
    " #### Bitwise left shift\n",
    " y x << 3\n",
    " #### Bitwise Not\n",
    " y = ~x\n",
    "### Comparison operators\n",
    "Equal                       x == y\t\n",
    "Not equal                   x != y\t\n",
    "Greater than                x > y\t\n",
    "Less than                   x < y\t\n",
    "Greater than or equal to\tx >= y\t\n",
    "Less than or equal to\t    x <= y\n",
    "\n",
    "#### Logical operators\n",
    "and returns True if both statements are true, eg \ta < 4 and  z==6\n",
    "and returns True if either statements are true, eg \ta < 4 or  z==6\n",
    "not\treturns False if the result is true and vice versa\n",
    "#### Identity operators\n",
    "Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location:\n",
    "is \treturns True if both variables are the same object,\tx is y\t\n",
    "is not\treturns True if both variables are not the same object,\tx is not y\n",
    "### Membership operators\n",
    "in \t:returns True if a sequence with the specified value is present in the object,\tx in y\t\n",
    "not in\t:returns True if a sequence with the specified value is not present in the object,x not in y\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "False\n",
      "False\n",
      "0\n",
      "8\n"
     ]
    }
   ],
   "source": [
    "\n",
    "print(65 > 64)\n",
    "print(3 == 4)\n",
    "print(13 < 2)\n",
    "print(10&5)\n",
    "print(2**3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Returning to strings\n",
    "\n",
    "Python allows the % symbol - similar to C style formatting, but this can be difficult to read, remember C?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Hello, Gordon. You are 21.'"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "name = \"Gordon\"\n",
    ">>> age = 21\n",
    ">>> \"Hello, %s. You are %s.\" % (name, age)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Python 3.6+ has formatted string literals! F-string is a string literal that is prefixed with 'f' or 'F'. These strings may contain replacement fields, which are expressions delimited by curly braces {}. While other string literals always have a constant value, formatted strings are really expressions evaluated at run time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello Elen, you are 10 years old!\n"
     ]
    }
   ],
   "source": [
    "x=4+6\n",
    "you=\"Elen\"\n",
    "print(f'hello {you}, you are {x} years old!')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## If Statement\n",
    "Note the colon and the use of indentation instead of braces or begin/end pairs.  Python uses indentation as part of its syntax and it defines scope.  Be careful."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "It's true b is greater than a!\n",
      "hi\n"
     ]
    }
   ],
   "source": [
    "a=5\n",
    "b=7.2\n",
    "if b>a:\n",
    "    print(\"It's true b is greater than a!\")\n",
    "    print(\"hi\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### elif and else\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "It's true b is greater than a!\n"
     ]
    }
   ],
   "source": [
    "a=3\n",
    "b=5\n",
    "if b>a:\n",
    "    print(\"It's true b is greater than a!\")\n",
    "elif  a==b:\n",
    "    print(\"a is greater than 4\")\n",
    "else:\n",
    "    print(\"a must be greater than b\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n"
     ]
    }
   ],
   "source": [
    "for x in range(6):\n",
    "  print(x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Collection data types\n",
    "There are four collection data types in the Python programming language:\n",
    "\n",
    "List: is a collection which is ordered and changeable. Allows duplicate members.\n",
    "Tuple: is a collection which is ordered and unchangeable. Allows duplicate members.\n",
    "Set: is a collection which is unordered and unindexed. No duplicate members.\n",
    "Dictionary: is a collection which is unordered, changeable and indexed. No duplicate members."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['apple', 'banana', 'cherry', 'orange', 'kiwi', 'melon', 'mango']\n",
      "melon\n",
      "['apple', 'banana', 'cherry', 'orange', 'kiwi']\n",
      "['apple', 'banana', 'cherry', 'orange']\n",
      "['cherry', 'orange', 'kiwi', 'melon', 'mango']\n",
      "['apple', 'banana', 'cherry', 'orange', 'kiwi', 'melon', 'mango']\n",
      "mango\n",
      "['orange', 'kiwi', 'melon']\n",
      "['kiwi', 'melon']\n",
      "['apple', 'blackcurrant', 'cherry', 'orange', 'kiwi', 'melon', 'mango']\n",
      "7\n",
      "['apple', 'blackcurrant', 'cherry', 'orange', 'kiwi', 'melon', 'mango', 'lemon']\n",
      "['apple', 'kiwi', 'blackcurrant', 'cherry', 'orange', 'kiwi', 'melon', 'mango', 'lemon']\n",
      "['apple', 'blackcurrant', 'cherry', 'orange', 'kiwi', 'melon', 'mango', 'lemon']\n",
      "['apple', 'blackcurrant', 'cherry', 'orange', 'kiwi', 'melon', 'mango']\n",
      "['blackcurrant', 'cherry', 'orange', 'kiwi', 'melon', 'mango']\n",
      "[]\n"
     ]
    }
   ],
   "source": [
    "thislist = [\"apple\", \"banana\", \"cherry\", \"orange\", \"kiwi\", \"melon\", \"mango\"]\n",
    "print(thislist)\n",
    "print(thislist[5])\n",
    "# print(thislist[2,5])  #Error: list indices must be integers or slices, not tuple\n",
    "print(thislist[0:5]) #note the colon makes this a range so element 5 is not printed\n",
    "print(thislist[:4])\n",
    "print(thislist[2:])\n",
    "print(thislist[0:100])\n",
    "print(thislist[-1])\n",
    "print(thislist[-4:-1]) #note the colon makes this a range so the last element is not printed\n",
    "print(thislist[4:-1])\n",
    "#change an element\n",
    "thislist[1] = \"blackcurrant\"\n",
    "print(thislist)\n",
    "print(len(thislist))\n",
    "thislist.append(\"lemon\")\n",
    "print(thislist)\n",
    "thislist.insert(1, \"kiwi\")\n",
    "print(thislist)\n",
    "thislist.remove(\"kiwi\")  #note first kiwi is removed only\n",
    "print(thislist)\n",
    "thislist.pop()\n",
    "print(thislist)\n",
    "del thislist[0]\n",
    "print(thislist)\n",
    "del thislist #deletes entire list\n",
    "#print(thislist)\n",
    "thislist = [\"apple\", \"banana\", \"cherry\"]\n",
    "thislist.clear()\n",
    "print(thislist)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " Typing list2 = list1, does not copy the list as list2 will only be a reference to list1.\n",
    " To copy use the copy() method or the list() method"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['apple', 'banana', 'cherry']\n",
      "['cheddar', 'stilton', 'wensledale']\n",
      "cheddar\n",
      "stilton\n",
      "wensledale\n",
      "['apple', 'banana', 'cherry', 'cheddar', 'stilton', 'wensledale']\n"
     ]
    }
   ],
   "source": [
    "thislist = [\"apple\", \"banana\", \"cherry\"]\n",
    "mylist = thislist.copy()\n",
    "print(mylist)\n",
    "thatlist = [\"cheddar\", \"stilton\", \"wensledale\"]\n",
    "mylist = list(thatlist)\n",
    "print(mylist)\n",
    "#loop through list\n",
    "for x in mylist:\n",
    "  print(x)\n",
    "\n",
    "#Add lists\n",
    "dessertlist = thislist + mylist\n",
    "print(dessertlist)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A tuple is a collection which is ordered and unchangeable. In Python tuples are written with round brackets."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('apple', 'banana', 'cherry')\n",
      "apple\n",
      "banana\n",
      "cherry\n",
      "<class 'tuple'>\n",
      "<class 'str'>\n",
      "Yes, 'apple' is in the fruits tuple\n"
     ]
    },
    {
     "ename": "NameError",
     "evalue": "name 'thistuple' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[14], line 21\u001b[0m\n\u001b[0;32m     19\u001b[0m thistuple \u001b[38;5;241m=\u001b[39m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mapple\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mbanana\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcherry\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m     20\u001b[0m \u001b[38;5;28;01mdel\u001b[39;00m thistuple\n\u001b[1;32m---> 21\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43mthistuple\u001b[49m) \u001b[38;5;66;03m#this will raise an error because the tuple no longer exists\u001b[39;00m\n\u001b[0;32m     23\u001b[0m \u001b[38;5;66;03m#Join two tuples\u001b[39;00m\n\u001b[0;32m     24\u001b[0m tuple1 \u001b[38;5;241m=\u001b[39m (\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124ma\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mb\u001b[39m\u001b[38;5;124m\"\u001b[39m , \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mc\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
      "\u001b[1;31mNameError\u001b[0m: name 'thistuple' is not defined"
     ]
    }
   ],
   "source": [
    "thistuple = (\"apple\", \"banana\", \"cherry\")\n",
    "print(thistuple)\n",
    "\n",
    "thistuple = (\"apple\", \"banana\", \"cherry\")\n",
    "for x in thistuple:\n",
    "  print(x)\n",
    "#use a comma after item if there is only one item in the tuple\n",
    "thistuple = (\"apple\",)\n",
    "print(type(thistuple))\n",
    "\n",
    "#NOT a tuple\n",
    "thistuple = (\"apple\")\n",
    "print(type(thistuple))\n",
    "\n",
    "thistuple = (\"apple\", \"banana\", \"cherry\")\n",
    "if \"apple\" in thistuple:\n",
    "  print(\"Yes, 'apple' is in the fruits tuple\")\n",
    "\n",
    "thistuple = (\"apple\", \"banana\", \"cherry\")\n",
    "del thistuple\n",
    "print(thistuple) #this will raise an error because the tuple no longer exists\n",
    "\n",
    "#Join two tuples\n",
    "tuple1 = (\"a\", \"b\" , \"c\")\n",
    "tuple2 = (1, 2, 3)\n",
    "\n",
    "tuple3 = tuple1 + tuple2\n",
    "print(tuple3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " Mapping Type: dict.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "When you've done this: write a piece of code that:- converts from degrees Fahrenheit to degrees C and vice versa.\n",
    "\n",
    "Code up FizzBuzz game (o/p Fizz if number is divisible by 3, buzz if 5 and fizzbuzz if divisable by both. Use for loop and range statement."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(1, 46):  # note the range of values is from 1 to 46, excluding 46\n",
    "    if i % 15 == 0:\n",
    "        print(\"fizzbizz\")\n",
    "    elif i % 5 == 0:\n",
    "        print(\"buzz\")\n",
    "    elif i % 3 == 0:\n",
    "        print(\"fizz\")\n",
    "    else:\n",
    "        print(i)\n",
    "\n",
    "        \n",
    "choice=1;\n",
    "while choice != \"3\":\n",
    "    print('Temperature Converter\\n Please enter a number between 1 and 3\\n'\n",
    "      '1:Fahrenheit to Celsius\\n2:Celcius to Farenheit\\n 3:End Program')\n",
    "    choice=input()\n",
    "    if choice==\"1\":\n",
    "        # calc F->C\n",
    "        temp=input(\"Enter temp in degrees F: \")\n",
    "        convTemp=5.0/9.0*(float(temp)-32)\n",
    "        print(f\"{temp} degrees F is {convTemp} degrees C\")\n",
    "    if choice == \"2\":\n",
    "        #calc C->F\n",
    "        temp=input(\"Enter temp in degrees C: \")\n",
    "        convTemp = 9.0 / 5.0 * float(temp) + 32\n",
    "        print(f\"{temp} degrees C is {convTemp} degrees F\")\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Functions\n",
    "Function begin with def and don't forget to put a colon at then end of the func def line and indent.\n",
    "See fizzbuzz written as a function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def fizzbuzz(num):\n",
    "\n",
    "    if num % 15 == 0:\n",
    "        return \"fizzbizz\"\n",
    "    elif num % 5 == 0:\n",
    "        return \"buzz\"\n",
    "    elif num % 3 == 0:\n",
    "        return \"fizz\"\n",
    "    return num\n",
    "\n",
    "\n",
    "for i in range (1, 42) :  #note the range of values is from 1 to 41, excluding 42\n",
    "    print(fizzbuzz(i))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
