Commit 46aa52c7 authored by George Mount's avatar George Mount
Browse files

clear out cell blocks and files

parent a7fe1175
...@@ -14,20 +14,11 @@ ...@@ -14,20 +14,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"7\n",
"<class 'int'>\n"
]
}
],
"source": [ "source": [
"a = -10 + 2\n", "a = -10 + 2\n",
"b = abs(a)\n", "b = abs(a)\n",
...@@ -53,20 +44,11 @@ ...@@ -53,20 +44,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"['North', 'East', 'South', 'West']\n",
"6\n"
]
}
],
"source": [ "source": [
"directions = ['North','East','South','West']\n", "directions = ['North','East','South','West']\n",
"print(directions)\n", "print(directions)\n",
...@@ -93,19 +75,11 @@ ...@@ -93,19 +75,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"['Friday', 'Monday', 'Saturday', 'Sunday', 'Thursday', 'Tuesday', 'Wednesday']\n"
]
}
],
"source": [ "source": [
"my_week = (['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'])\n", "my_week = (['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'])\n",
"my_week.sort()\n", "my_week.sort()\n",
...@@ -114,19 +88,11 @@ ...@@ -114,19 +88,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"[]\n"
]
}
],
"source": [ "source": [
"my_week.clear()\n", "my_week.clear()\n",
"print(my_week)" "print(my_week)"
...@@ -143,21 +109,11 @@ ...@@ -143,21 +109,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 34, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"[7, 12, 5]\n",
"[5, 10]\n",
"[12, 5, 10, 9]\n"
]
}
],
"source": [ "source": [
"my_list = [7,12,5,10,9]\n", "my_list = [7,12,5,10,9]\n",
"\n", "\n",
...@@ -184,19 +140,9 @@ ...@@ -184,19 +140,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"['on', 'lists', 'of', 'strings', 'identically']\n",
"['Slicing', 'works', 'on', 'lists']\n",
"['strings', 'identically']\n"
]
}
],
"source": [ "source": [
"this_list = [\"Slicing\",\"works\",\"on\",\"lists\",\"of\",\"strings\",\"identically\"]\n", "this_list = [\"Slicing\",\"works\",\"on\",\"lists\",\"of\",\"strings\",\"identically\"]\n",
"\n", "\n",
...@@ -230,20 +176,9 @@ ...@@ -230,20 +176,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 36, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"3628800"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"import math\n", "import math\n",
"\n", "\n",
...@@ -285,7 +220,7 @@ ...@@ -285,7 +220,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.7.1" "version": "3.7.9"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -63,20 +63,9 @@ ...@@ -63,20 +63,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"# This is a code block. \n", "# This is a code block. \n",
"# You can execute code here.\n", "# You can execute code here.\n",
...@@ -112,20 +101,9 @@ ...@@ -112,20 +101,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"-4"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"# Is this -2 or -4?\n", "# Is this -2 or -4?\n",
"2 - 3 * 2" "2 - 3 * 2"
...@@ -168,20 +146,9 @@ ...@@ -168,20 +146,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"# We can also call functions:\n", "# We can also call functions:\n",
"# Let's find the absolute value of -100\n", "# Let's find the absolute value of -100\n",
...@@ -197,21 +164,9 @@ ...@@ -197,21 +164,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"ename": "NameError",
"evalue": "name 'ABS' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-10-4e20255314da>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;31m# These aren't going to work to find them!\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mABS\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m100\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'ABS' is not defined"
]
}
],
"source": [ "source": [
"# These aren't going to work to find them!\n", "# These aren't going to work to find them!\n",
"ABS(-100)" "ABS(-100)"
...@@ -219,21 +174,9 @@ ...@@ -219,21 +174,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"ename": "NameError",
"evalue": "name 'Abs' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-11-5b4961d07d91>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mAbs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m100\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'Abs' is not defined"
]
}
],
"source": [ "source": [
"Abs(-100)" "Abs(-100)"
] ]
...@@ -256,20 +199,9 @@ ...@@ -256,20 +199,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"# Is 3 > 4?\n", "# Is 3 > 4?\n",
"3 > 4" "3 > 4"
...@@ -317,20 +249,9 @@ ...@@ -317,20 +249,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"my_first_variable = abs(-100)" "my_first_variable = abs(-100)"
] ]
...@@ -348,19 +269,11 @@ ...@@ -348,19 +269,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"100\n"
]
}
],
"source": [ "source": [
"print(my_first_variable)" "print(my_first_variable)"
] ]
...@@ -374,21 +287,9 @@ ...@@ -374,21 +287,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"ename": "NameError",
"evalue": "name 'MY_FIRST_VARIABLE' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-17-97b021f5434c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mMY_FIRST_VARIABLE\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[1;31mNameError\u001b[0m: name 'MY_FIRST_VARIABLE' is not defined"
]
}
],
"source": [ "source": [
"print(MY_FIRST_VARIABLE)" "print(MY_FIRST_VARIABLE)"
] ]
...@@ -421,28 +322,9 @@ ...@@ -421,28 +322,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"1\n"
]
},
{
"ename": "NameError",
"evalue": "name 'razzle' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-18-b656c0e722b5>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0m_\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[0mrazzle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdazzle\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mabs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m19\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 7\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrazzle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdazzle\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'razzle' is not defined"
]
}
],
"source": [ "source": [
"# Try assigning and printing these variables if you're not sure!\n", "# Try assigning and printing these variables if you're not sure!\n",
"\n", "\n",
...@@ -490,22 +372,11 @@ ...@@ -490,22 +372,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'int'>\n",
"<class 'float'>\n",
"<class 'str'>\n",
"<class 'bool'>\n"
]
}
],
"source": [ "source": [
"# Assigning different variable types\n", "# Assigning different variable types\n",
"\n", "\n",
...@@ -538,20 +409,9 @@ ...@@ -538,20 +409,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 21, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"# Absolute value of my_int\n", "# Absolute value of my_int\n",
"abs(my_int)" "abs(my_int)"
...@@ -559,20 +419,9 @@ ...@@ -559,20 +419,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 22, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"5"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"# Length of my_string\n", "# Length of my_string\n",
"len(my_string)" "len(my_string)"
...@@ -580,19 +429,11 @@ ...@@ -580,19 +429,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 23, "execution_count": null,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"10\n"
]
}
],
"source": [ "source": [
"# Assign the product to a variable\n", "# Assign the product to a variable\n",
"my_nonsense = abs(my_int) * len(my_string)\n", "my_nonsense = abs(my_int) * len(my_string)\n",
...@@ -624,7 +465,7 @@ ...@@ -624,7 +465,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",