{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "![Callysto.ca Banner](https://github.com/callysto/curriculum-notebooks/blob/master/callysto-notebook-banner-top.jpg?raw=true)\n", "\n", "\"Open" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(Click **Cell** > **Run All** before proceeding.) " ] }, { "cell_type": "markdown", "metadata": { "scrolled": true, "tags": [ "hide-input" ] }, "source": [ "" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "tags": [ "hide-input" ] }, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "#----------\n", "\n", "#Import modules and packages \n", "import ipywidgets as widgets\n", "import random\n", "import math\n", "import matplotlib.pyplot as plt\n", "from ipywidgets import Output, IntSlider, VBox, HBox, Layout\n", "from IPython.display import clear_output, display, HTML, Javascript, SVG, YouTubeVideo\n", "\n", "#----------\n", "\n", "#ipywidgets as widgets\n", "#import random\n", "\n", "#This function produces a multiple choice form with four options\n", "def multiple_choice(option_1, option_2, option_3, option_4):\n", " option_list = [option_1, option_2, option_3, option_4]\n", " answer = option_list[0]\n", " letters = [\"(A) \", \"(B) \", \"(C) \", \"(D) \"]\n", "\n", " #Boldface letters at the beginning of each option\n", " start_bold = \"\\033[1m\"; end_bold = \"\\033[0;0m\"\n", "\n", " #Randomly shuffle the options\n", " random.shuffle(option_list)\n", " \n", " #Prints the letters (A) to (D) in sequence with randomly chosen options\n", " for i in range(4):\n", " option_text = option_list.pop()\n", " print(start_bold + letters[i] + end_bold + option_text)\n", "\n", " #Stores the correct answer\n", " if option_text == answer:\n", " letter_answer = letters[i]\n", "\n", " button1 = widgets.Button(description=\"(A)\"); button2 = widgets.Button(description=\"(B)\")\n", " button3 = widgets.Button(description=\"(C)\"); button4 = widgets.Button(description=\"(D)\")\n", " \n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = 'Whitesmoke'\n", " \n", " container = widgets.HBox(children=[button1,button2,button3,button4])\n", " display(container)\n", " print(\" \", end='\\r')\n", "\n", " def on_button1_clicked(b):\n", " if \"(A) \" == letter_answer:\n", " print(\"Correct! 👏\", end='\\r')\n", " button1.style.button_color = '#abffa8'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = 'Whitesmoke'\n", " else:\n", " print(\"Try again! \", end='\\r')\n", " button1.style.button_color = '#ffbbb8'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = 'Whitesmoke'\n", "\n", " def on_button2_clicked(b):\n", " if \"(B) \" == letter_answer:\n", " print(\"Correct! 👏\", end='\\r')\n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = '#abffa8'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = 'Whitesmoke'\n", " else:\n", " print(\"Try again! \", end='\\r')\n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = '#ffbbb8'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = 'Whitesmoke'\n", "\n", " def on_button3_clicked(b):\n", " if \"(C) \" == letter_answer:\n", " print(\"Correct! 👏\", end='\\r')\n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = '#abffa8'; button4.style.button_color = 'Whitesmoke'\n", " else:\n", " print(\"Try again! \", end='\\r')\n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = '#ffbbb8'; button4.style.button_color = 'Whitesmoke'\n", "\n", " def on_button4_clicked(b):\n", " if \"(D) \" == letter_answer:\n", " print(\"Correct! 👏\", end='\\r')\n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = '#abffa8'\n", " else:\n", " print(\"Try again! \", end='\\r')\n", " button1.style.button_color = 'Whitesmoke'; button2.style.button_color = 'Whitesmoke'\n", " button3.style.button_color = 'Whitesmoke'; button4.style.button_color = '#ffbbb8'\n", "\n", " button1.on_click(on_button1_clicked); button2.on_click(on_button2_clicked)\n", " button3.on_click(on_button3_clicked); button4.on_click(on_button4_clicked)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Chemical Nomenclature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook will outline and explain the following concepts:\n", "\n", "- [Section 1](#Section_1): Review (Periodic Table, ions, and atomic structure)\n", "- [Section 2](#Section_2): How Elements Form Compounds (ionic bonds versus covalent bonds)\n", "- [Section 3](#Section_3): Naming Binary Ionic Compounds\n", "- [Section 4](#Section_4): Naming Ionic Compounds with Polyatomic Ions\n", "- [Section 5](#Section_5): Writing Formulas for Ionic Compounds\n", "- [Section 6](#Section_6): Writing Formulas for Molecular Compounds\n", "- [Section 7](#Section_7): Naming Molecular Compounds" ] }, { "cell_type": "markdown", "metadata": { "scrolled": true, "tags": [ "hide-input" ] }, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 1: Review\n", "\n", "[Back to Top](#Top)\n", "\n", "Make reference to the following periodic table throughout this notebook:\n", "\n", "\n", "\n", "\n", "Note: The content covered in the following multiple choice is review material (concepts that you should already be familiar with)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 1:** The elements on the Periodic Table are" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mUnorganized and cannot be grouped together in any way.\n", "\u001b[1m(B) \u001b[0;0mIn electronically neutral form.\n", "\u001b[1m(C) \u001b[0;0mAll charged with either a positive or negative charge.\n", "\u001b[1m(D) \u001b[0;0mAll metals or metal alloys.\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "cf89a492688f41b589ee115893675ca0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"In electronically neutral form.\" \n", "option_2 = \"All metals or metal alloys.\"\n", "option_3 = \"All charged with either a positive or negative charge.\"\n", "option_4 = \"Unorganized and cannot be grouped together in any way.\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 2:** The subatomic particle that is involved in the bonding of atoms is called the" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mElectron\n", "\u001b[1m(B) \u001b[0;0mNucleus\n", "\u001b[1m(C) \u001b[0;0mProton\n", "\u001b[1m(D) \u001b[0;0mNeutron\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f11096cbd86e4ae1835d4421b0896418", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Electron\" \n", "option_2 = \"Proton\"\n", "option_3 = \"Neutron\"\n", "option_4 = \"Nucleus\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 3:** What is the name of the atomic model below?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mQuantum Mechanical Model\n", "\u001b[1m(B) \u001b[0;0mPlum Pudding Model\n", "\u001b[1m(C) \u001b[0;0mSolar System Model\n", "\u001b[1m(D) \u001b[0;0mBohr Model\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "75b039b817c8441ba52e5292ae5c73c8", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Bohr Model\" \n", "option_2 = \"Quantum Mechanical Model\"\n", "option_3 = \"Plum Pudding Model\"\n", "option_4 = \"Solar System Model\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 4:** What is the symbol and charge for each subatomic particle?" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mNone of the options are correct.\n", "\u001b[1m(B) \u001b[0;0mProtons (p⁻), electrons (e⁺), neutrons (n⁰).\n", "\u001b[1m(C) \u001b[0;0mProtons (p⁺), electrons (e⁰), neutrons (n⁻).\n", "\u001b[1m(D) \u001b[0;0mProtons (p⁺), electrons (e⁻), neutrons (n⁰).\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e79d27e5ee154f16a5892d67ba3de5cb", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Protons (p{}), electrons (e{}), neutrons (n{}).\".format(chr(0x207A), chr(0x207B), chr(0x2070)) \n", "option_2 = \"Protons (p{}), electrons (e{}), neutrons (n{}).\".format(chr(0x207B), chr(0x207A), chr(0x2070))\n", "option_3 = \"Protons (p{}), electrons (e{}), neutrons (n{}).\".format(chr(0x207A), chr(0x2070), chr(0x207B))\n", "option_4 = \"None of the options are correct.\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 5:** A *cation* is a _______ charged ion. An *anion* is a _______ charged ion." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mpositively; neutral\n", "\u001b[1m(B) \u001b[0;0mneutral; negatively\n", "\u001b[1m(C) \u001b[0;0mpositively; negatively\n", "\u001b[1m(D) \u001b[0;0mnegatively; positively\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "1beaeb84eea14e1581b277cd63d626ac", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"positively; negatively\" \n", "option_2 = \"negatively; positively\"\n", "option_3 = \"neutral; negatively\"\n", "option_4 = \"positively; neutral\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": { "scrolled": true, "tags": [ "hide-input" ] }, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 2: How Elements Form Compounds\n", "\n", "[Back to Top](#Top)\n", "\n", "Much of chemical activity involves the transfer or sharing of electrons. \n", "\n", "**Ionic compounds** are combinations of *cations* and *anions*, which are generally (but not always) metals and non-metals. Their compounds are held together by electrostatic attractions between oppositely charged ions (similar to a magnetic attraction). This is called an **ionic bond**.\n", "\n", "**Covalent (or molecular) compounds** are generally composed of non-metals only. Electrons are shared between atoms. This is called a **covalent bond**.\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 3: Naming Binary Ionic Compounds\n", "\n", "[Back to Top](#Top)\n", "\n", "Steps for naming **binary** ionic compounds:\n", "\n", "1. Name the cation (often a metal) first.\n", "2. Name the anion (often a non-metal) second. For the anion, **drop the ending and add \"ide\"**.\n", "3. Use Roman numerals in parentheses to indicate which charge of cation is used. This is **only** used for metals that make more than one charge. Below is a table of the Roman numerals from 1 to 10:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Number | Roman Numeral\n", " --- | ---\n", " 1 | I\n", " 2 | II\n", " 3 | III\n", " 4 | IV\n", " 5 | V\n", " 6 | VI\n", " 7 | VII\n", " 8 | VIII\n", " 9 | IX\n", " 10 | X" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Examples\n", "\n", "Name the following ionic compounds:\n", "1. Ca$_3$N$_2$\n", "2. Mg$_3$P$_2$\n", "3. Al$_2$O$_3$\n", "4. CuCl$_2$\n", "5. FeBr$_3$\n", "6. CoN" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5143d0a707d343209d37a6e39bce3ade", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(Button(button_style='primary', description='Answers 1-3', layout=Layout(height='100%', width='2…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#----------\n", "\n", "#import ipywidgets as widgets\n", "#from ipywidgets import Output, VBox, Layout\n", "#from IPython.display import clear_output, display, HTML\n", "\n", "#----------\n", "\n", "out1 = Output()\n", "button1_step1 = widgets.Button(description=\"Answers 1-3\", layout=Layout(width='20%', height='100%'), button_style='primary')\n", "count1 = 1\n", "\n", "text1_1 = widgets.HTMLMath(value=r\"1. Calcium nitride\")\n", "text1_2 = widgets.HTMLMath(value=r\"2. Magnesium phosphide\")\n", "text1_3 = widgets.HTMLMath(value=r\"3. Aluminum oxide\")\n", "\n", "def on_button1_step1_clicked(b):\n", " global count1\n", " count1 += 1\n", " with out1:\n", " clear_output()\n", " if count1 % 2 == 0:\n", " display(text1_1, text1_2, text1_3)\n", " \n", "display(VBox([button1_step1, out1]))\n", "button1_step1.on_click(on_button1_step1_clicked)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "90bc829a866045e0b3e1b1fb97a3c492", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(Button(button_style='primary', description='Answers 4-6', layout=Layout(height='100%', width='2…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#----------\n", "\n", "#import ipywidgets as widgets\n", "#from ipywidgets import Output, VBox, Layout\n", "#from IPython.display import clear_output, display, HTML\n", "\n", "#----------\n", "\n", "out2 = Output()\n", "button1_step2 = widgets.Button(description=\"Answers 4-6\", layout=Layout(width='20%', height='100%'), button_style='primary')\n", "count2 = 1\n", "\n", "text1_4 = widgets.HTMLMath(value=r\"4. Reference the periodic table. Notice how copper makes more than one charge (+2 or +1). Recall how compounds are electronically neutral. Since chlorine always makes a -1 charge (and there are two chlorine atoms), this implies that copper must be taking a +2 charge in this situation.\")\n", "text1_4_2 = widgets.HTMLMath(value=r\" Answer: Copper (II) chloride\")\n", "text1_5 = widgets.HTMLMath(value=r\"5. Iron (III) bromide (similar to #4)\")\n", "text1_6 = widgets.HTMLMath(value=r\"6. N takes a -3 charge and we have one nitrogen and one cobalt atom. Cobalt must be taking a +3 charge to make the compound neutral.\")\n", "text1_6_2 = widgets.HTMLMath(value=r\"Answer: Cobalt (III) nitride\")\n", "def on_button1_step2_clicked(b):\n", " global count2\n", " count2 += 1\n", " with out2:\n", " clear_output()\n", " if count2 % 2 == 0:\n", " display(text1_4, text1_4_2, text1_5, text1_6, text1_6_2)\n", " \n", "display(VBox([button1_step2, out2]))\n", "button1_step2.on_click(on_button1_step2_clicked)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Multiple Choice)\n", "\n", "Choose the option with the correct name for the following ionic compounds." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 1:** CaCl$_2$" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mCalcium (II) chloride\n", "\u001b[1m(B) \u001b[0;0mChlorine Calcium\n", "\u001b[1m(C) \u001b[0;0mCalcium chloride\n", "\u001b[1m(D) \u001b[0;0mCalcium chlorine\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "dad9cb49c3bb426e84fc2ccad365ee69", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Calcium chloride\" \n", "option_2 = \"Calcium chlorine\"\n", "option_3 = \"Chlorine Calcium\"\n", "option_4 = \"Calcium (II) chloride\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 2:** MgBr$_2$" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mMagnesium bromide\n", "\u001b[1m(B) \u001b[0;0mMagnesium (II) bromide\n", "\u001b[1m(C) \u001b[0;0mMagnesium bromine\n", "\u001b[1m(D) \u001b[0;0mMagnesium (II) bromine\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "78d3022841f742f1836978417976b13b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Magnesium bromide\" \n", "option_2 = \"Magnesium bromine\"\n", "option_3 = \"Magnesium (II) bromide\"\n", "option_4 = \"Magnesium (II) bromine\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 3:** FeI$_3$" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mIron (III) iodide\n", "\u001b[1m(B) \u001b[0;0mIron iodine\n", "\u001b[1m(C) \u001b[0;0mIron iodide\n", "\u001b[1m(D) \u001b[0;0mIron (III) iodinide\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d81c96337f1543ef88cf934b1b62ef74", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Iron (III) iodide\" \n", "option_2 = \"Iron iodine\"\n", "option_3 = \"Iron iodide\"\n", "option_4 = \"Iron (III) iodinide\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 4:** CuCl" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mCopper chlorine\n", "\u001b[1m(B) \u001b[0;0mCalcium (I) chlorine\n", "\u001b[1m(C) \u001b[0;0mCopper chloride\n", "\u001b[1m(D) \u001b[0;0mCopper (I) chloride\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "37a8efcf886b486f8516cdf9f34a7e2d", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Copper (I) chloride\" \n", "option_2 = \"Copper chloride\"\n", "option_3 = \"Copper chlorine\"\n", "option_4 = \"Calcium (I) chlorine\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 5:** Cr$_3$N$_2$" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mChromium nitride\n", "\u001b[1m(B) \u001b[0;0mChromium (III) nitride\n", "\u001b[1m(C) \u001b[0;0mChromium (VI) nitride\n", "\u001b[1m(D) \u001b[0;0mChromium (II) nitride\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d25471b5c7e84b4bbf2175ada9de7e2f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Chromium (II) nitride\" \n", "option_2 = \"Chromium (VI) nitride\"\n", "option_3 = \"Chromium (III) nitride\"\n", "option_4 = \"Chromium nitride\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Fill-in-the-blank)\n", "\n", "Write the names for the following ionic compounds. Spelling, capitalization, and spacing matters! (Match the format of the examples above). Note that the first letter of each name is capitalized and roman numerals are capitalized." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a9b050ad77ac4a849dd9372b3f73e8e1", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='LiCl', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank1 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"LiCl\",\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank1)\n", "\n", " \n", "def callback1(wdgt):\n", " if (wdgt.value == \"Lithium chloride\") or (wdgt.value == \"lithium chloride\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank1.on_submit(callback1)\n", " else:\n", " print(\"Hint: Name the metal 1st and the non-metal 2nd. Remember to change the non-metal's ending to 'ide'!\", end='\\r')\n", " blank1.on_submit(callback1)\n", "\n", "blank1.on_submit(callback1)\n", "\n" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9a6595e22d1c4bfaa7287ed3984ea66c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='Sr₃P₂', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank2 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"Sr{}P{}\".format(chr(0x2083), chr(0x2082)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank2)\n", "\n", " \n", "def callback2(wdgt):\n", " if (wdgt.value == \"Strontium phosphide\") or (wdgt.value == \"strontium phosphide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank2.on_submit(callback2)\n", " else:\n", " print(\"Hint: Name the metal 1st and the non-metal 2nd. Remember to change the non-metal's ending to 'ide'!\", end='\\r')\n", " blank2.on_submit(callback2)\n", "\n", "blank2.on_submit(callback2)\n", "\n" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c980c866ccfc4f8eb30f2067d15acfec", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='Ag₂S', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank3 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"Ag{}S\".format(chr(0x2082)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank3)\n", "\n", " \n", "def callback3(wdgt):\n", " if (wdgt.value == \"Silver sulfide\") or (wdgt.value == \"silver sulfide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank3.on_submit(callback3)\n", " else:\n", " print(\"Hint: Name the metal 1st and the non-metal 2nd. Remember to change the non-metal's ending to 'ide'!\", end='\\r')\n", " blank3.on_submit(callback3)\n", "\n", "blank3.on_submit(callback3)\n", "\n" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "12dd04f660b246d5bb1155026caeecb0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='SnI₄', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank4 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"SnI{}\".format(chr(0x2084)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank4)\n", "\n", " \n", "def callback4(wdgt):\n", " if (wdgt.value == \"Tin (IV) iodide\") or (wdgt.value == \"tin (iv) iodide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank4.on_submit(callback4)\n", " else:\n", " print(\"Hint: Remember to reference if the metal makes more than one charge!\", end='\\r')\n", " blank4.on_submit(callback4)\n", "\n", "blank4.on_submit(callback4)\n" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "59089061af714ea98346bb9e0acb988f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='PdS₂', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank5 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"PdS{}\".format(chr(0x2082)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank5)\n", "\n", " \n", "def callback5(wdgt):\n", " if (wdgt.value == \"Palladium (IV) sulfide\") or (wdgt.value == \"palladium (iv) sulfide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank5.on_submit(callback5)\n", " else:\n", " print(\"Hint: Remember to reference if the metal makes more than one charge!\", end='\\r')\n", " blank5.on_submit(callback5)\n", "\n", "blank5.on_submit(callback5)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 4: Naming Ionic Compounds with Polyatomic Ions\n", "\n", "[Back to Top](#Top)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Polyatomic ions** are groups of atoms that tend to stay together and carry an overall ionic charge. Reference the following table of polyatomic ions throughout the rest of this notebook:\n", "\n", " Name | Formula\n", " --- | ---\n", " Ammonium | NH$_4$ $^{+1}$\n", " Bicarbonate | HCO$_3$ $^{-1}$\n", " Carbonate | CO$_3$ $^{-2}$\n", " Carbonite | CO$_2$ $^{-2}$\n", " Chlorate | ClO$_3$ $^{-1}$\n", " Chlorite | ClO$_2$ $^{-1}$\n", " Chromate | CrO$_4$ $^{-2}$\n", " Cyanide | CN $^{-1}$\n", " Hydroxide | OH $^{-1}$\n", " Iodate | IO$_3$ $^{-1}$\n", " Iodite | IO$_2$ $^{-1}$\n", " Nitrate | NO$_3$ $^{-1}$\n", " Nitrite | NO$_2$ $^{-1}$\n", " Phosphate | PO$_4$ $^{-3}$\n", " Phosphite | PO$_3$ $^{-3}$\n", " Sulfate | SO$_4$ $^{-2}$\n", " Sulfite | SO$_3$ $^{-2}$\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Section 2:** Steps for naming ionic compounds with *polyatomic ions*.\n", "\n", "1. For polyatomic compounds, name the cation (metal) first followed by the name of the polyatomic ion. The endings **do not** change. \n", "2. Like before, use Roman numerals in parentheses to indicate which charge of cation is used. This is **only** used for metals that make more than one charge." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Examples\n", "\n", "Name the following ionic compounds:\n", "\n", "1. Al(OH)$_3$\n", "2. NaHCO$_3$\n", "3. Sn(NO$_3$)$_4$" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "214910fc034342c9ba8e22b23f810b62", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(Button(button_style='primary', description='Answers', layout=Layout(height='100%', width='20%')…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#----------\n", "\n", "#import ipywidgets as widgets\n", "#from ipywidgets import Output, VBox, Layout\n", "#from IPython.display import clear_output, display, HTML\n", "\n", "#----------\n", "\n", "out3 = Output()\n", "button2_step1 = widgets.Button(description=\"Answers\", layout=Layout(width='20%', height='100%'), button_style='primary')\n", "count3 = 1\n", "\n", "text2_1 = widgets.HTMLMath(value=r\"1. Answer: Aluminum hydroxide. OH is a compound called 'hydroxide' (see the table of polyatomic ions above). Also, aluminum makes only one charge.\")\n", "text2_2 = widgets.HTMLMath(value=r\"2. Answer: Sodium bicarbonate. NaHCO$_3$ is a compound called 'bicarbonate'. Also, sodium makes only one charge.\")\n", "text2_3 = widgets.HTMLMath(value=r\"3. Answer: Tin (IV) nitrite. Sn(NO$_3$)$_4$ is a compound called 'nitrite'. Notice that Sn (tin) takes two charges (+2 or +4); therefore, we need to use Roman numerals. Nitrite takes a -1 charge, so tin is taking a +4 charge in this situation.\")\n", "\n", "def on_button2_step1_clicked(b):\n", " global count3\n", " count3 += 1\n", " with out3:\n", " clear_output()\n", " if count3 % 2 == 0:\n", " display(text2_1, text2_2, text2_3)\n", " \n", "display(VBox([button2_step1, out3]))\n", "button2_step1.on_click(on_button2_step1_clicked)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Multiple Choice)\n", "\n", "Choose the option with the correct name for the following ionic compounds involving polyatomic ions." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 1:** KNO$_3$" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mPotassium (II) nitride\n", "\u001b[1m(B) \u001b[0;0mPotassium nitrate\n", "\u001b[1m(C) \u001b[0;0mPotassium (II) nitrate\n", "\u001b[1m(D) \u001b[0;0mPotassium nitride\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7f7ce1f37d91472b9d6ee31f010272df", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Potassium nitrate\" \n", "option_2 = \"Potassium nitride\"\n", "option_3 = \"Potassium (II) nitrate\"\n", "option_4 = \"Potassium (II) nitride\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 2:** Mg$_3$(PO$_4$)$_2$" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mMagnesium (II) phosphate\n", "\u001b[1m(B) \u001b[0;0mMagnesium phosphide\n", "\u001b[1m(C) \u001b[0;0mMagnesium (II) phosphide\n", "\u001b[1m(D) \u001b[0;0mMagnesium phosphate\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "811defc9a85443bdb41cd34f36a01930", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Magnesium phosphate\" \n", "option_2 = \"Magnesium (II) phosphate\"\n", "option_3 = \"Magnesium phosphide\"\n", "option_4 = \"Magnesium (II) phosphide\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Fill-in-the-blank)\n", "\n", "Write the names for the following ionic compounds involving polyatomic ions. As before, spelling, capitalization, and spacing matters! Note that the first letter of each name is capitalized and Roman numerals are capitalized." ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "38bd984df0724db2b91d11fb8a4cf609", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='NaOH', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank6 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"NaOH\",\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank6)\n", "\n", " \n", "def callback6(wdgt):\n", " if (wdgt.value == \"Sodium hydroxide\") or (wdgt.value == \"sodium hydroxide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank6.on_submit(callback6)\n", " else:\n", " print(\"Hint: Remember to reference the table of polyatomic ions above!\", end='\\r')\n", " blank6.on_submit(callback6)\n", "\n", "blank6.on_submit(callback6)\n" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "64eefcac9e5646a489270e935eab6a61", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='Pb(NO₂)₄', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank7 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"Pb(NO{}){}\".format(chr(0x2082), chr(0x2084)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank7)\n", "\n", " \n", "def callback7(wdgt):\n", " if (wdgt.value == \"Lead (IV) nitrite\") or (wdgt.value == \"lead (iv) nitrite\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank7.on_submit(callback7)\n", " else:\n", " print(\"Hint: Remember to reference the table of polyatomic ions above!\", end='\\r')\n", " blank7.on_submit(callback7)\n", "\n", "blank7.on_submit(callback7)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 5: Writing Formulas for Ionic Compounds\n", "\n", "[Back to Top](#Top)\n", "\n", "We now consider how to convert a compound name to a formula. Since each ionic compound is electronically neutral, we have the following steps:\n", "\n", "1. Note the **ionic** charges and the **symbols** for both the cation and anion.\n", "2. Determine the lowest number of each element that would make the entire compound **electronically neutral**.\n", "\n", "**Note:** \n", "- Some metals can make more than one kind of ion. Roman numerals in brackets indicate the **charge** of the ion.\n", "- If you require more than one polyatomic ion, remember to put the *entire* polyatomic ion in brackets along with a subscript indicating the number required." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Examples\n", "\n", "Write the formulas for the following ionic compounds:\n", "\n", "1. Calcium iodide\n", "2. Sodium phosphide\n", "3. Iron (III) oxide\n", "4. Iron (II) oxide\n", "5. Sodium carbonite\n", "6. Aluminum sulfate" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "721c848f4fcd4ad28e8ea7b0f8d8ad28", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(Button(button_style='primary', description='Answers', layout=Layout(height='100%', width='20%')…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#----------\n", "\n", "#import ipywidgets as widgets\n", "#from ipywidgets import Output, VBox, Layout\n", "#from IPython.display import clear_output, display, HTML\n", "\n", "#----------\n", "\n", "out4 = Output()\n", "button3_step1 = widgets.Button(description=\"Answers\", layout=Layout(width='20%', height='100%'), button_style='primary')\n", "count4 = 1\n", "\n", "text3_1 = widgets.HTMLMath(value=r\"1. Answer: CaI$_2$. The charges involved are Ca$^{+2}$ and I$^{-1}$. We need exactly 2 iodine atoms to cancel calcium's +2 charge.\")\n", "text3_2 = widgets.HTMLMath(value=r\"2. Answer: Na$_3$P. We have Na$^+$ and P$^{-3}$, so we need 3 sodium atoms to cancel phosphorus' -3 charge.\")\n", "text3_3 = widgets.HTMLMath(value=r\"3. Answer: Fe$_2$O$_3$. The Roman numeral III tells us that we have Fe$^{+3}$. Since oxygen takes a -2 charge, we need exactly 2 Fe atoms and 3 O atoms to arrive at an electronically neutral compound.\")\n", "text3_4 = widgets.HTMLMath(value=r\"4. Answer: FeO. We have Fe$^{+2}$ and O$^{-2}$, so we need exactly 1 Fe atom and 1 O atom to arrive at an electronically neutral compound.\")\n", "text3_5 = widgets.HTMLMath(value=r\"5. Answer: Na$_2$CO$_2$. We have Na$^+$ and CO$_2^{-2}$, so we need 2 Na atoms and 1 CO$_2$ molecule.\")\n", "text3_6 = widgets.HTMLMath(value=r\"6. Al$^{+3}$ and SO$_4^{-2}$ $\\implies$ Al$_2$(SO$_4$)$_3$.\")\n", "\n", "def on_button3_step1_clicked(b):\n", " global count4\n", " count4 += 1\n", " with out4:\n", " clear_output()\n", " if count4 % 2 == 0:\n", " display(text3_1, text3_2, text3_3, text3_4, text3_5, text3_6)\n", " \n", "display(VBox([button3_step1, out4]))\n", "button3_step1.on_click(on_button3_step1_clicked)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Multiple Choice)\n", "\n", "Choose the option with the correct formula for the following ionic compounds." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 1:** Sodium bromide" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mSBr₂\n", "\u001b[1m(B) \u001b[0;0mBrNa\n", "\u001b[1m(C) \u001b[0;0mSBr\n", "\u001b[1m(D) \u001b[0;0mNaBr\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0a82e309629d42899a298d5e64178dc7", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"NaBr\" \n", "option_2 = \"BrNa\"\n", "option_3 = \"SBr{}\".format(chr(0x2082))\n", "option_4 = \"SBr\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 2:** Zinc iodide" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mZnI₂\n", "\u001b[1m(B) \u001b[0;0mZn₂I₂\n", "\u001b[1m(C) \u001b[0;0mZnIO₃\n", "\u001b[1m(D) \u001b[0;0mZnI\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0d0ef6e5db144b4eb264179654b080c0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"ZnI{}\".format(chr(0x2082)) \n", "option_2 = \"ZnI\"\n", "option_3 = \"Zn{}I{}\".format(chr(0x2082), chr(0x2082))\n", "option_4 = \"ZnIO{}\".format(chr(0x2083))\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 3:** Cobalt (II) chloride" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mCoClO₃\n", "\u001b[1m(B) \u001b[0;0mCo₂Cl\n", "\u001b[1m(C) \u001b[0;0mCoCl₂\n", "\u001b[1m(D) \u001b[0;0mCoCl\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "76fbe6c3793d4ad1aa6a2dba1310996a", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"CoCl{}\".format(chr(0x2082))\n", "option_2 = \"CoClO{}\".format(chr(0x2083))\n", "option_3 = \"CoCl\"\n", "option_4 = \"Co{}Cl\".format(chr(0x2082))\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 4:** Lead (IV) selenide" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mPbSe\n", "\u001b[1m(B) \u001b[0;0mPbSe\n", "\u001b[1m(C) \u001b[0;0mPb₂Se₄\n", "\u001b[1m(D) \u001b[0;0mPbSe₂\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "707fa4aee4294383a2216c9006dc7ac0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"PbSe{}\".format(chr(0x2082))\n", "option_2 = \"Pb{}Se{}\".format(chr(0x2082), chr(0x2084))\n", "option_3 = \"PbSe\"\n", "option_4 = \"PbSe\".format(chr(0x2084))\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 5:** Silver nitrate" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mAgNO₂\n", "\u001b[1m(B) \u001b[0;0mAgNO₃\n", "\u001b[1m(C) \u001b[0;0mAg(NO)₃\n", "\u001b[1m(D) \u001b[0;0mAg₃N\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "46e6e89b30ee4b0497ac3f722acd37f5", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"AgNO{}\".format(chr(0x2083))\n", "option_2 = \"Ag(NO){}\".format(chr(0x2083))\n", "option_3 = \"Ag{}N\".format(chr(0x2083))\n", "option_4 = \"AgNO{}\".format(chr(0x2082))\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 6:** Iron (II) phosphate" ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mFe₃PO₄\n", "\u001b[1m(B) \u001b[0;0mFe₂(PO₄)₃\n", "\u001b[1m(C) \u001b[0;0mFe₃(PO₄)₂\n", "\u001b[1m(D) \u001b[0;0mFePO₄\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e3ee86fe219946b6a7cfb2dce0af54b9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"Fe{}(PO{}){}\".format(chr(0x2083), chr(0x2084), chr(0x2082))\n", "option_2 = \"FePO{}\".format(chr(0x2084))\n", "option_3 = \"Fe{}PO{}\".format(chr(0x2083), chr(0x2084))\n", "option_4 = \"Fe{}(PO{}){}\".format(chr(0x2082), chr(0x2084), chr(0x2083))\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 6: Writing Formulas for Molecular Compounds\n", "\n", "[Back to Top](#Top)\n", "\n", "Recall that a binary molecular compound is composed of two non-metals and that they are share electrons via covalent bonds (ex. CO$_2$). There are two main steps to writing formulas for molecular compounds:\n", "\n", "1. Write the symbols of each non-metal.\n", "2. Write the appropriate subscripts for each non-metal that correspond to the prefixes used.\n", "\n", "Note: The prefix *mono* is **never** used on the first non-metal.\n", "\n", "Here is a list of prefixes used for molecular compounds:\n", "\n", " Number | Prefix\n", " --- | ---\n", " 1 | mono\n", " 2 | di\n", " 3 | tri\n", " 4 | tetra\n", " 5 | penta\n", " 6 | hexa\n", " 7 | hepta\n", " 8 | octa\n", " 9 | nona\n", " 10 | deca" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Examples\n", "\n", "Write the formulas for the following molecular compounds.\n", "\n", "1. Carbon dioxide\n", "2. Dinitrogen trioxide\n", "3. Carbon tetrafluoride" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fe39caf81b9143c7a4bc0df665aa8247", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(Button(button_style='primary', description='Answers', layout=Layout(height='100%', width='20%')…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#----------\n", "\n", "#import ipywidgets as widgets\n", "#from ipywidgets import Output, VBox, Layout\n", "#from IPython.display import clear_output, display, HTML\n", "\n", "#----------\n", "\n", "out5 = Output()\n", "button4_step1 = widgets.Button(description=\"Answers\", layout=Layout(width='20%', height='100%'), button_style='primary')\n", "count5 = 1\n", "\n", "text4_1 = widgets.HTMLMath(value=r\"1. Answer: CO$_2$. No prefix in front of carbon implies that there is one carbon. The prefix 'di' implies that there are two oxygen atoms.\")\n", "text4_2 = widgets.HTMLMath(value=r\"2. Answer: N$_2$O$_3$\")\n", "text4_3 = widgets.HTMLMath(value=r\"3. Answer: CF$_4$\")\n", "\n", "def on_button4_step1_clicked(b):\n", " global count5\n", " count5 += 1\n", " with out5:\n", " clear_output()\n", " if count5 % 2 == 0:\n", " display(text4_1, text4_2, text4_3)\n", " \n", "display(VBox([button4_step1, out5]))\n", "button4_step1.on_click(on_button4_step1_clicked)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Multiple Choice)\n", "\n", "Choose the option with the correct formula for the following molecular compounds." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 1:** Sulfur trioxide" ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mS₃O\n", "\u001b[1m(B) \u001b[0;0mNot possible\n", "\u001b[1m(C) \u001b[0;0mSO₃\n", "\u001b[1m(D) \u001b[0;0mS₃O₃\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "48e957e00aaa4fa586ab227674955197", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"SO{}\".format(chr(0x2083))\n", "option_2 = \"S{}O\".format(chr(0x2083))\n", "option_3 = \"S{}O{}\".format(chr(0x2083), chr(0x2083))\n", "option_4 = \"Not possible\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 2:** Diboron trioxide" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0m2B3O\n", "\u001b[1m(B) \u001b[0;0mB₃O₂\n", "\u001b[1m(C) \u001b[0;0m3B2O\n", "\u001b[1m(D) \u001b[0;0mB₂O₃\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "faea1727366b49089a3f8e7f9ca36ee6", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"B{}O{}\".format(chr(0x2082), chr(0x2083))\n", "option_2 = \"B{}O{}\".format(chr(0x2083), chr(0x2082))\n", "option_3 = \"2B3O\"\n", "option_4 = \"3B2O\"\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 3:** Phosphorus trihydride" ] }, { "cell_type": "code", "execution_count": 34, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m(A) \u001b[0;0mP(OH)₃\n", "\u001b[1m(B) \u001b[0;0mP₃H\n", "\u001b[1m(C) \u001b[0;0mPH₃\n", "\u001b[1m(D) \u001b[0;0mP₃(OH)\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "28b49c12a8cb46c3a3075a7d2eef5df3", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(Button(description='(A)', style=ButtonStyle(button_color='Whitesmoke')), Button(description='(B…" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "#import ipywidgets as widgets\n", "\n", "#Assign each multiple choice to these four variables\n", "#Option_1 contains the answer\n", "option_1 = \"PH{}\".format(chr(0x2083))\n", "option_2 = \"P{}H\".format(chr(0x2083))\n", "option_3 = \"P(OH){}\".format(chr(0x2083))\n", "option_4 = \"P{}(OH)\".format(chr(0x2083))\n", "\n", "multiple_choice(option_1, option_2, option_3, option_4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Section 7: Naming Molecular Compounds\n", "\n", "[Back to Top](#Top)\n", "\n", "Steps:\n", "\n", "1. Write the name of the first non-metal and then the second.\n", "2. Place the appropriate **prefixes** in front of each of the names. The prefixes correspond to the subscripts of each element.\n", "3. Drop the ending of the last element named and add **ide**.\n", "\n", "Note: Sometimes the prefixes are shortened when the ending vowel of the prefix \"conflicts\" with a starting vowel in the compound. This makes the name easier to pronounce. For example, \"tetraoxide\" is written as \"tetroxide\" and \"monooxide\" is shortened to \"monoxide\".\n", "\n", "Recall the following list of prefixes:\n", "\n", " Number | Prefix\n", " --- | ---\n", " 1 | mono\n", " 2 | di\n", " 3 | tri\n", " 4 | tetra\n", " 5 | penta\n", " 6 | hexa\n", " 7 | hepta\n", " 8 | octa\n", " 9 | nona\n", " 10 | deca" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Examples\n", "\n", "Name the following molecular compounds.\n", "\n", "1. CS$_2$\n", "2. N$_2$O$_4$\n", "3. P$_4$S$_{10}$" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "985a570a8bf04d2c992c80637c31e343", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(Button(button_style='primary', description='Answers', layout=Layout(height='100%', width='20%')…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#----------\n", "\n", "#import ipywidgets as widgets\n", "#from ipywidgets import Output, VBox, Layout\n", "#from IPython.display import clear_output, display, HTML\n", "\n", "#----------\n", "\n", "out6 = Output()\n", "button5_step1 = widgets.Button(description=\"Answers\", layout=Layout(width='20%', height='100%'), button_style='primary')\n", "count6 = 1\n", "\n", "text5_1 = widgets.HTMLMath(value=r\"1. Answer: Carbon disulfide. The prefix 'mono' is never used for the first element.\")\n", "text5_2 = widgets.HTMLMath(value=r\"2. Answer: Dinitrogen tetroxide. Recall that 'tetraoxide' is shortened to 'tetroxide'. This avoids two vowels being next to each other.\")\n", "text5_3 = widgets.HTMLMath(value=r\"3. Answer: Tetraphosphorus decasulfide\")\n", "\n", "def on_button5_step1_clicked(b):\n", " global count6\n", " count6 += 1\n", " with out6:\n", " clear_output()\n", " if count6 % 2 == 0:\n", " display(text5_1, text5_2, text5_3)\n", " \n", "display(VBox([button5_step1, out6]))\n", "button5_step1.on_click(on_button5_step1_clicked)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Practice (Fill-in-the-blank)\n", "\n", "Write the names for the following molecular compounds. Remember that spelling and spacing matters." ] }, { "cell_type": "code", "execution_count": 36, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0bdbcff05f2d4545ab292d0112470ef4", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='CO', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank8 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"CO\",\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank8)\n", "\n", " \n", "def callback8(wdgt):\n", " if (wdgt.value == \"Carbon monoxide\") or (wdgt.value == \"carbon monoxide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank8.on_submit(callback8)\n", " else:\n", " print(\"Hint: Remember to drop the vowel in the prefix!\", end='\\r')\n", " blank8.on_submit(callback8)\n", "\n", "blank8.on_submit(callback8)\n" ] }, { "cell_type": "code", "execution_count": 37, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "1481231d6cdc4374adac4c6e597d553e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='CF₄', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank9 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"CF{}\".format(chr(0x2084)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank9)\n", "\n", " \n", "def callback9(wdgt):\n", " if (wdgt.value == \"Carbon tetrafluoride\") or (wdgt.value == \"carbon tetrafluoride\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank9.on_submit(callback9)\n", " else:\n", " print(\"Hint: Remember that the prefix 'mono' is never used for the first element!\", end='\\r')\n", " blank9.on_submit(callback9)\n", "\n", "blank9.on_submit(callback9)\n" ] }, { "cell_type": "code", "execution_count": 38, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "923f060528604902af7e9b8ca1560bc9", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Text(value='', description='N₂O₅', placeholder='Type name here & press ENTER')" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "blank10 = widgets.Text(\n", " value='',\n", " placeholder='Type name here & press ENTER',\n", " description=\"N{}O{}\".format(chr(0x2082), chr(0x2085)),\n", " disabled=False\n", ")\n", "\n", "\n", "display(blank10)\n", "\n", " \n", "def callback10(wdgt):\n", " if (wdgt.value == \"Dinitrogen pentoxide\") or (wdgt.value == \"dinitrogen pentoxide\"):\n", " print(\"Correct! 👏 \", end='\\r')\n", " blank10.on_submit(callback10)\n", " else:\n", " print(\"Hint: Remember to drop the vowel in the prefix!\", end='\\r')\n", " blank10.on_submit(callback10)\n", "\n", "blank10.on_submit(callback10)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Summary\n", "\n", " - There are generally two types of compounds: ionic and covalent.\n", " - Ionic compounds are composed of a cation (usually a metal) and an anion (usually a non-metal).\n", " - Covalent compounds are usually composed of non-metals only.\n", " - There are two separate naming systems for both ionic and covalent compounds.\n", " - It is critical to become fluent in both naming systems in order to achieve success and understanding in chemistry." ] }, { "cell_type": "code", "execution_count": 39, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%html\n", "\n", "\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[![Callysto.ca License](https://github.com/callysto/curriculum-notebooks/blob/master/callysto-notebook-banner-bottom.jpg?raw=true)](https://github.com/callysto/curriculum-notebooks/blob/master/LICENSE.md)" ] } ], "metadata": { "celltoolbar": "Edit 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.7.4" } }, "nbformat": 4, "nbformat_minor": 2 }