{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "cBfRc7j-3Dun"
   },
   "source": [
    "# Lecture 2, Part 1 Exercises"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "MJZeaxbJUTJV"
   },
   "source": [
    "## Question 0: Review"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "75EgNbEdYwTE"
   },
   "source": [
    "**0.0**\n",
    "\n",
    "Whew! Yesterday we dived straight into `Python`! We hope you are really like `Python` so far.\n",
    "\n",
    "Remember, raise your hand if you have any questions. We are here to learn together with you!\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "XxyXvsRzUbXp"
   },
   "source": [
    "**0.1** \n",
    "\n",
    "Write, in words in a comment (don't forget the `#`):\n",
    "* Two uses of square brackets `[]`\n",
    "* Two uses of round brackets `()`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "QnyiJr58XZ1o"
   },
   "outputs": [],
   "source": [
    "# Two uses of square brackets here!\n",
    "\n",
    "# Two uses of round brackets here!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "EzdVy90UVLTM"
   },
   "source": [
    "**0.2**\n",
    "\n",
    "`True` or `False`: Mark each statement as `True` or `False`\n",
    "\n",
    "1. You can make a *list* with round brackets `()`.\n",
    "2. The assignment `=` is the same as the comparison `==`.\n",
    "3. The assignment `a = b` means the same thing as the assignment `b = a`\n",
    "4. For integers `a`,`b`: `a == b` is the same as `b == a`\n",
    "5. The result of `==`, `and`, `or`, `not` has type `boolean` (remember, `boolean` variables store `True` or `False`)\n",
    "6. The line `a = b` means we are setting the value stored inside `b`.\n",
    "7. The line `a = b` means we are setting the value stored inside `a`.\n",
    "8. Using `==` alone does not change the values stored inside the variables."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "aJdrPAvLXExw"
   },
   "source": [
    "Write your answers here!\n",
    "\n",
    "1. \n",
    "2.\n",
    "3.\n",
    "4.\n",
    "5.\n",
    "6.\n",
    "7.\n",
    "8.\n",
    "\n",
    "If you have any questions or are unsure, please raise your hand! We went over this pretty quickly yesterday, so we expect a lot of questions."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "KPM2evaq3Duo"
   },
   "source": [
    "## Question 1: Printing Things\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "jwOebVs73Dup"
   },
   "source": [
    "**1.1** \n",
    "\n",
    "Use function _print_ to print ```\"Boaz\"```. On a new line, print his occupation - ```\"Lecturer\"```. Finish by printing the `list` of his favorite TAs - ```\"Orr\"```, ```\"Jabari\"```, ```\"Natnael\"```, and ```\"Bryan\"```.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "4hPQYv0C3Duq"
   },
   "outputs": [],
   "source": [
    "# Your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "F8U0tapU3Duw"
   },
   "source": [
    "**1.2** \n",
    "\n",
    "Given the code below, print ```x```, ```y```, and ```z``` on three different lines."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "g7TxFr5X3Dux"
   },
   "outputs": [],
   "source": [
    "x = 17\n",
    "y = 19\n",
    "z = 42\n",
    "\n",
    "# Your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "8dqsENZT3Du1"
   },
   "source": [
    "**1.3**\n",
    "\n",
    "Given the code below, print ```u```, ```v```, and ```w``` on the same line. There are many different ways to do this! \n",
    "\n",
    "*Challenge: Do this two ways if you remember how!*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "-DFnop2A3Du2"
   },
   "outputs": [],
   "source": [
    "u = [3, 5, 8]\n",
    "v = True\n",
    "w = 3.14\n",
    "\n",
    "# Your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "721Z50Su3Du6"
   },
   "source": [
    "## Question 2: List Indexing\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "qZb3Q5eD3Du7"
   },
   "source": [
    "**2.1**\n",
    " \n",
    "Given the list ```list1```, print the first element. \n",
    "\n",
    "*Hint: what index is the first element?*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "Jq8s3yXj3Du8"
   },
   "outputs": [],
   "source": [
    "list1 = [\"coder\", 2022, \"jam\"]\n",
    "\n",
    "# Your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "0s456woN3DvA"
   },
   "source": [
    "**2.2**\n",
    " \n",
    "Given the list ```list2```, print the last element.\n",
    "\n",
    "*Hint: what index is the last element?*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "wEyrspPz3DvB"
   },
   "outputs": [],
   "source": [
    "list2 = ['apple', 'orange', 'banana', 'pear',\n",
    "         'dragonfruit', 'lychee', 'starfruit']\n",
    "\n",
    "\n",
    "# Your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "dYrJ4v4_3DvX"
   },
   "source": [
    "## Question 3: String Comparisons"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "xkreUcsv3DvX"
   },
   "source": [
    "**3.1**\n",
    " \n",
    "Try executing the code below. Can you change the output by changing only 1 character (there may be multiple solutions)?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "8PSbFJZa3DvY"
   },
   "outputs": [],
   "source": [
    "x = 42\n",
    "y = 111\n",
    "\n",
    "# Modify the output of this code by changing only 1 character:\n",
    "print(x < y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "1QAcecKL3Dvc"
   },
   "source": [
    "**3.2**\n",
    "\n",
    "What is different in the case below? What will be printed?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "wtgz1eHd3Dvd"
   },
   "source": [
    "```\n",
    "x = \"42\"\n",
    "y = \"111\"\n",
    "print(x < y)\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "UD4xnRXT3Dve"
   },
   "outputs": [],
   "source": [
    "# Your answer here"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "27T0ARvh3Dvf"
   },
   "source": [
    "**3.3**\n",
    " \n",
    "Construct an 4 digit number and a 5 digit number such that the 4 digit number is greater than the 5 digit number when they are of type string. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "BV9E0CLX3Dvg"
   },
   "outputs": [],
   "source": [
    "# Your code here.\n",
    "\n",
    "# Make sure to test your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "amXndd0W3Dvl"
   },
   "source": [
    "**3.4**\n",
    " \n",
    "What would be the result of the following operations?\n",
    "\n",
    "\n",
    "```python\n",
    "'A' == 'a' \n",
    "'Brunch'< 'banana' \n",
    "'coffee' < 'Coffee' \n",
    "'Dog' > 'cat'\n",
    "'Bryan' != 'bryan'\n",
    "'nadia' > 'nadi'\n",
    "'CORINA VIRUS' < 'CORONA VIRUS'\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "SIYL0N813Dvs"
   },
   "source": [
    "**3.5**\n",
    " \n",
    "Check your answer in the box below. Can you figure out the rules for string comparisons?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "E-_d4bYV3Dvt"
   },
   "outputs": [],
   "source": [
    "# Explore here\n",
    "# print('A' == 'a')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "VBX3T-643Dvv"
   },
   "source": [
    "## Question 4: Basic Functions\n",
    "\n",
    "*Note: sometimes each cell can also be hidden*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "nwc1BwLx3Dvw"
   },
   "source": [
    "### 4.1 \n",
    "Write a function that takes ```x``` as an argument, and returns ```5 * x```."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "aoz7L9se3Dvw"
   },
   "outputs": [],
   "source": [
    "def multFive(x):\n",
    "  # Your code here.\n",
    "\n",
    "\n",
    "    # Test your code here.\n",
    "multFive(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "hQ824svS3Dvz"
   },
   "source": [
    "### 4.2 \n",
    "Write a function that takes ```x``` as an argument and returns ```x + 2```. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "Ojgg_T4Q3Dv0"
   },
   "outputs": [],
   "source": [
    "def addTwo(x):\n",
    "  # Your code here.\n",
    "\n",
    "\n",
    "    # Test your code here.\n",
    "addTwo(2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "juihTViV3Dv3"
   },
   "source": [
    "### 4.3 \n",
    "Write a function that returns ```5 * x + 10```, without using any arithmetic operations.\n",
    "\n",
    "_Hint: use multFive and addTwo. Please run the cells for exercises 4.1 and 4.2 before running this cell._"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "3UKAiGBl3Dv3"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "9MFG5nedAJqh"
   },
   "source": [
    "## Question 5: Calculator Functions\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "2lWaFHGC3Dv6"
   },
   "source": [
    "### 5.1 \n",
    "Write a function called ```addXtoY``` that takes two arguments ```x``` and ```y```, and returns their sum. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "ZDZsqta_3Dv6"
   },
   "outputs": [],
   "source": [
    "# Define addXtoY(x, y) function here.\n",
    "\n",
    "\n",
    "# Test your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "rToywkYC3Dv9"
   },
   "source": [
    "### 5.2 \n",
    "Write a function called ```multiplyXandY``` that takes two arguments ```x``` and ```y```, and returns their product. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "-nIwrQp63DwC"
   },
   "outputs": [],
   "source": [
    "# Define multiplyXandY(x, y) function here.\n",
    "\n",
    "\n",
    "# Test your code here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "O6EfwZ_33DwE"
   },
   "source": [
    "### 5.3 \n",
    "Similar to the functions from 5.1 and 5.2, add a few more functions that simulate a calculator's functions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "WfUyVERw3DwF"
   },
   "outputs": [],
   "source": [
    "# Define your functions here.\n",
    "\n",
    "\n",
    "# Test your functions here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "FK2YN_Pp3DwJ"
   },
   "source": [
    "### 5.4 \n",
    "Use your calculator functions to write a function that represents $ f(x) = 5x + 4 $."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "6LYDjadv3DwK"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "7cRTSw2H3DwN"
   },
   "source": [
    "## Question 6: String Functions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "9mmFbOkC3DwN"
   },
   "source": [
    "### 6.1 \n",
    "Write a function called ```concatXandY``` that takes two strings ```x``` and ```y```, and concatenates them together."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "5DX7WcSW3DwO"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "2gB3XPjJ3DwR"
   },
   "source": [
    "### 6.2 \n",
    "Write a function ```concatXYZ``` that takes three strings ```x```, ```y```, and ```z```, and concatenates them together **without using any arithmethic (including `+`) operations**.\n",
    "\n",
    "*Hint: you can call the function you wrote in 6.1*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "UeH_tcUA3DwS"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "a_bmDxIu3DwW"
   },
   "source": [
    "## Question 7: CToF\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "yZfizhwJ3DwX"
   },
   "source": [
    "### 7.1 \n",
    "Write a function ```cToF``` that converts Celsius to Fahrenheit using the equation $F = C \\times \\frac{9}{5} + 32$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "B_wfCqD63DwY"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "IBXdjcMZ3Dwd"
   },
   "source": [
    "### 7.2 \n",
    "Write a function ```fToC``` that converts Fahrenheit to Celsius using the equation $C = (F - 32) \\times \\frac{5}{9}$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "Q3-NQ0Tx3Dwd"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "H511TM4X3Dwh"
   },
   "source": [
    "### 7.3 \n",
    "What happens when you call ```cToF(fToC(x))```? Try for a few values of ```x```. Can you show that it is true using math? "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "YyEjcp-A3Dwi"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "5pI3DDzd3Dwl"
   },
   "source": [
    "## Question 8: Pythag\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "gxVdZ62A3Dwm"
   },
   "source": [
    "### 8.1 \n",
    "Write a function called ```pythagoreanTriplet``` that takes in 3 integers which will represent triangle side lengths and returns a bool, to determine if it forms a right-angled triangle. The arguments are guaranteed to be sorted in increasing order.\n",
    "\n",
    "_Hint: A triangle is a right-angled when side lengths a, b, and c satisfy $ a^{2} + b^{2} = c^{2}$._ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "dd15dCl83Dwm"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here.\n",
    "# Add your own test cases to confirm your solution works properly.\n",
    "print(pythagoreanTriplet(3, 4, 5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "Rm9AzDFrTT-J"
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "KsP7vDBz3Dwp"
   },
   "source": [
    "## Question 9: Palindrome"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "w0FkjQ3k3Dwp"
   },
   "source": [
    "### 9.1 \n",
    "A palindrome is a string that is the same when read forwards and backwards. For example, \"madam\", \"alabala\", and \"12321\" are palindromes but \"daniel\", \"hello\", and \"1234\" are not. Write a function ```threePalindrome``` that takes in a THREE-LETTER string, and returns a boolean that is ```True``` when the string is palindrome, and ```False``` when it is not.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "KFXNe2Bc3Dwr"
   },
   "outputs": [],
   "source": [
    "# Define your function here.\n",
    "\n",
    "\n",
    "# Test your function here. Try different three letter palindromes here!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "_UhGlRUc3Dw0"
   },
   "source": [
    "## Question 10: Funk! Func!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "P1ekwsWW3Dw1"
   },
   "source": [
    "### 10.1 \n",
    "Look at the function below. Without calling it, can you predict the outcomes of calling ```funkyFunc(100)```, ```funkyFunc(123456)```, and ```funkyFunc(420)```?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "NHDP7jkW3Dw1"
   },
   "outputs": [],
   "source": [
    "# Run this cell first.\n",
    "def funkyFunc(x):\n",
    "    z = x * 10\n",
    "    x = x % 10\n",
    "    z = z + x\n",
    "    return z"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "mIjxn2aa3Dw2"
   },
   "outputs": [],
   "source": [
    "# FILL IN YOUR ANSWERS FOR ??\n",
    "\n",
    "# for x = 100,     funkyFunc(x) = ??\n",
    "# for x = 123456,  funkyFunc(x) = ??\n",
    "# for x = 420,      funkyFunc(x) = ??\n",
    "\n",
    "# Check your answers below with code:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "W_rNUgyF3Dw6"
   },
   "source": [
    "### 10.2 \n",
    "Can you write a function ```funkierFunc``` which takes one argument and for which the following equation is true for any $x>0$:\n",
    " \n",
    " ```funkierFunc ( funkyFunc(x) ) = x```\n",
    " "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "WsApCAky3Dw6"
   },
   "outputs": [],
   "source": [
    "def funkierFunc(x):\n",
    "  # Your code here.\n",
    "\n",
    "    # Check if your code is correct here:\n",
    "funkierFunc(funkyFunc(12))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "MtgUiC6uygpe"
   },
   "source": [
    "## Question 11: Appendages"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "HzRUdqwmylLv"
   },
   "source": [
    "**11.1**\n",
    "\n",
    "Add `'leg'` to the octopus, human, and table using `append()`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "QaRy9eJQzFvm"
   },
   "outputs": [],
   "source": [
    "# 1. Octopus\n",
    "\n",
    "octopus = ['leg', 'leg', 'leg', 'leg', 'leg', 'leg', 'leg']\n",
    "\n",
    "# Add one more leg here!\n",
    "# \n",
    "\n",
    "print(len(octopus)) # Should be eight!\n",
    "\n",
    "# 2. Human\n",
    "\n",
    "human = ['arm', 'arm', 'leg']\n",
    "\n",
    "# Add one more leg here!\n",
    "#\n",
    "\n",
    "print(len(human)) # Should be four!\n",
    "\n",
    "# 3. Table\n",
    "\n",
    "table = ['top', 'leg', 'leg', 'leg']\n",
    "\n",
    "# Add one more leg here!\n",
    "#\n",
    "\n",
    "print(len(table)) # Should be five!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "VKPKLmW5zZm_"
   },
   "source": [
    "**11.2**\n",
    "\n",
    "Add `'end'` to the sentence using `append()`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "IzXHqk1Qzh5i"
   },
   "outputs": [],
   "source": [
    "sentence = ['put', 'the', 'word', 'end', 'at', 'the']\n",
    "\n",
    "# Add the word end to sentence here!\n",
    "\n",
    "print(sentence)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "Kv71jHQZz6MV"
   },
   "source": [
    "**11.3**\n",
    "\n",
    "Add the number `3` to the end of the second list so that each list is the same length!\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "ZxaeE9YL0Vqj"
   },
   "outputs": [],
   "source": [
    "list_of_lists = [[1, 2, 3], [1, 2], [1, 2, 3]]\n",
    "\n",
    "# Add 3 to the end of the second list!\n",
    "\n",
    "print(list_of_lists)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "ClLO5wIb18Q9"
   },
   "source": [
    "## Question 12: Follow the pattern"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "fcC1P3vr2Cyt"
   },
   "source": [
    "Use `insert()` to fill in what might be missing in the correct place in the list"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "jr9iAqhs2OKg"
   },
   "source": [
    "**12.1**\n",
    "```python\n",
    "my_list_1 = [1, 2, 3, 5, 6] # insert 4\n",
    "my_list_2 = ['a', 'b', 'd', 'e', 'f'] # insert c\n",
    "my_list_3 = ['is', 'the', 'country', 'we', 'are', 'in'] # insert jamaica\n",
    "my_list_4 = ['my', 'name', 'is'] # insert your name\n",
    "my_list_5 = [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5, 6]] # insert [1, 2, 3, 4, 5]\n",
    "```\n",
    "Code below!\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "6OUReQF42YRW"
   },
   "outputs": [],
   "source": [
    "my_list_1 = [1, 2, 3, 5, 6]\n",
    "# Insert here!\n",
    "\n",
    "print(my_list_1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "ZsleK-kX4boK"
   },
   "outputs": [],
   "source": [
    "my_list_2 = ['a', 'b', 'd', 'e', 'f']\n",
    "# Insert here!\n",
    "\n",
    "print(my_list_2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "kr5w9NhW4blQ"
   },
   "outputs": [],
   "source": [
    "my_list_3 = ['is', 'the', 'country', 'we', 'are', 'in']\n",
    "# Insert here!\n",
    "\n",
    "print(my_list_3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "Dju2g3Vv4biJ"
   },
   "outputs": [],
   "source": [
    "my_list_4 = ['my', 'name', 'is']\n",
    "# Insert here!\n",
    "\n",
    "print(my_list_4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "id": "mTep4xf34beD"
   },
   "outputs": [],
   "source": [
    "my_list_5 = [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5, 6]]\n",
    "# Insert here!\n",
    "\n",
    "print(my_list_5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "2NcFKD4qbhRU"
   },
   "source": [
    "## Instructions for after you are done!\n",
    "\n",
    "* If you are finished, please **raise your hand** and let us know\n",
    "* If everything looks good, please move on to the extra questions in notebook **probs2c, and do not start probs2b**  "
   ]
  }
 ],
 "metadata": {
  "colab": {
   "collapsed_sections": [
    "MJZeaxbJUTJV",
    "KPM2evaq3Duo",
    "721Z50Su3Du6",
    "dYrJ4v4_3DvX",
    "VBX3T-643Dvv",
    "9MFG5nedAJqh",
    "7cRTSw2H3DwN",
    "a_bmDxIu3DwW",
    "5pI3DDzd3Dwl",
    "KsP7vDBz3Dwp",
    "_UhGlRUc3Dw0",
    "P1ekwsWW3Dw1",
    "MtgUiC6uygpe"
   ],
   "name": "jamcoders_probs2a.ipynb",
   "provenance": []
  },
  "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.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}