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

clear out cell blocks and files

parent a7fe1175
......@@ -14,20 +14,11 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"7\n",
"<class 'int'>\n"
]
}
],
"outputs": [],
"source": [
"a = -10 + 2\n",
"b = abs(a)\n",
......@@ -53,20 +44,11 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['North', 'East', 'South', 'West']\n",
"6\n"
]
}
],
"outputs": [],
"source": [
"directions = ['North','East','South','West']\n",
"print(directions)\n",
......@@ -93,19 +75,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['Friday', 'Monday', 'Saturday', 'Sunday', 'Thursday', 'Tuesday', 'Wednesday']\n"
]
}
],
"outputs": [],
"source": [
"my_week = (['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'])\n",
"my_week.sort()\n",
......@@ -114,19 +88,11 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[]\n"
]
}
],
"outputs": [],
"source": [
"my_week.clear()\n",
"print(my_week)"
......@@ -143,21 +109,11 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[7, 12, 5]\n",
"[5, 10]\n",
"[12, 5, 10, 9]\n"
]
}
],
"outputs": [],
"source": [
"my_list = [7,12,5,10,9]\n",
"\n",
......@@ -184,19 +140,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['on', 'lists', 'of', 'strings', 'identically']\n",
"['Slicing', 'works', 'on', 'lists']\n",
"['strings', 'identically']\n"
]
}
],
"outputs": [],
"source": [
"this_list = [\"Slicing\",\"works\",\"on\",\"lists\",\"of\",\"strings\",\"identically\"]\n",
"\n",
......@@ -230,20 +176,9 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3628800"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"import math\n",
"\n",
......@@ -285,7 +220,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.7.9"
}
},
"nbformat": 4,
......
......@@ -63,20 +63,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# This is a code block. \n",
"# You can execute code here.\n",
......@@ -112,20 +101,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"-4"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Is this -2 or -4?\n",
"2 - 3 * 2"
......@@ -168,20 +146,9 @@
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# We can also call functions:\n",
"# Let's find the absolute value of -100\n",
......@@ -197,21 +164,9 @@
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"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"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# These aren't going to work to find them!\n",
"ABS(-100)"
......@@ -219,21 +174,9 @@
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"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"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Abs(-100)"
]
......@@ -256,20 +199,9 @@
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Is 3 > 4?\n",
"3 > 4"
......@@ -317,20 +249,9 @@
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"100"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"my_first_variable = abs(-100)"
]
......@@ -348,19 +269,11 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"100\n"
]
}
],
"outputs": [],
"source": [
"print(my_first_variable)"
]
......@@ -374,21 +287,9 @@
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"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"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(MY_FIRST_VARIABLE)"
]
......@@ -421,28 +322,9 @@
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"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"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Try assigning and printing these variables if you're not sure!\n",
"\n",
......@@ -490,22 +372,11 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'int'>\n",
"<class 'float'>\n",
"<class 'str'>\n",
"<class 'bool'>\n"
]
}
],
"outputs": [],
"source": [
"# Assigning different variable types\n",
"\n",
......@@ -538,20 +409,9 @@
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Absolute value of my_int\n",
"abs(my_int)"
......@@ -559,20 +419,9 @@
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Length of my_string\n",
"len(my_string)"
......@@ -580,19 +429,11 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10\n"
]
}
],
"outputs": [],
"source": [
"# Assign the product to a variable\n",
"my_nonsense = abs(my_int) * len(my_string)\n",
......@@ -624,7 +465,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -649,18 +490,9 @@
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 2, 3]\n",
"<class 'list'>\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Make a list\n",
"my_first_list = [1,2,3]\n",
......@@ -681,18 +513,9 @@
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 2, 3, 'Boo!']\n",
"<class 'list'>\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"my_other_list = [1,2,3,\"Boo!\"]\n",
"print(my_other_list)\n",
......@@ -708,18 +531,9 @@
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 2, 3, [1, 2, 3, 'Boo!']]\n",
"<class 'list'>\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"my_list_here = [1,2,3,[1,2,3,\"Boo!\"]]\n",
"print(my_list_here)\n",
......@@ -735,20 +549,9 @@
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"len(my_list_here)"
]
......@@ -784,17 +587,9 @@
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[-1, 2, 3, 4]\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"my_list = [-1,4,3,2]\n",
"\n",
......@@ -812,17 +607,9 @@
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",