Commit d7aed61a authored by Toby Hodges's avatar Toby Hodges

cleared output from cells

parent 7374e006
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -51,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": 185,
"execution_count": null,
"metadata": {
"collapsed": true
},
......@@ -71,24 +71,11 @@
},
{
"cell_type": "code",
"execution_count": 186,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sarah\n",
"Richard\n",
"Matthew\n",
"Fiona\n",
"Sally\n",
"Samuel\n"
]
}
],
"outputs": [],
"source": [
"for student in GroupA:\n",
" print(student)"
......@@ -96,26 +83,11 @@
},
{
"cell_type": "code",
"execution_count": 187,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Richard\n",
"Sally\n",
"Sandy\n",
"Peter\n",
"Rebecca\n",
"Steve\n",
"Lesley\n",
"Stuart\n"
]
}
],
"outputs": [],
"source": [
"for student in GroupB:\n",
" print(student)"
......@@ -123,23 +95,11 @@
},
{
"cell_type": "code",
"execution_count": 188,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Simon\n",
"Laura\n",
"Gareth\n",
"Alan\n",
"Helen\n"
]
}
],
"outputs": [],
"source": [
"for student in GroupC:\n",
" print(student)"
......@@ -154,7 +114,7 @@
},
{
"cell_type": "code",
"execution_count": 189,
"execution_count": null,
"metadata": {
"collapsed": true
},
......@@ -172,7 +132,7 @@
},
{
"cell_type": "code",
"execution_count": 190,
"execution_count": null,
"metadata": {
"collapsed": true
},
......@@ -194,37 +154,11 @@
},
{
"cell_type": "code",
"execution_count": 191,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sarah\n",
"Richard\n",
"Matthew\n",
"Fiona\n",
"Sally\n",
"Samuel\n",
"Richard\n",
"Sally\n",
"Sandy\n",
"Peter\n",
"Rebecca\n",
"Steve\n",
"Lesley\n",
"Stuart\n",
"Simon\n",
"Laura\n",
"Gareth\n",
"Alan\n",
"Helen\n"
]
}
],
"outputs": [],
"source": [
"for group in AllGroups:\n",
" for student in group:\n",
......@@ -268,7 +202,7 @@
},
{
"cell_type": "code",
"execution_count": 192,
"execution_count": null,
"metadata": {
"collapsed": true
},
......@@ -288,40 +222,11 @@
},
{
"cell_type": "code",
"execution_count": 193,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Group B\n",
"Richard\n",
"Sally\n",
"Sandy\n",
"Peter\n",
"Rebecca\n",
"Steve\n",
"Lesley\n",
"Stuart\n",
"Group C\n",
"Simon\n",
"Laura\n",
"Gareth\n",
"Alan\n",
"Helen\n",
"Group A\n",
"Sarah\n",
"Richard\n",
"Matthew\n",
"Fiona\n",
"Sally\n",
"Samuel\n"
]
}
],
"outputs": [],
"source": [
"for group in AllGroups.keys():\n",
" print(group)\n",
......@@ -501,7 +406,7 @@
},
{
"cell_type": "code",
"execution_count": 194,
"execution_count": null,
"metadata": {
"collapsed": true
},
......@@ -537,7 +442,7 @@
},
{
"cell_type": "code",
"execution_count": 195,
"execution_count": null,
"metadata": {
"collapsed": true
},
......@@ -557,22 +462,11 @@
},
{
"cell_type": "code",
"execution_count": 196,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"{'Alan': 61, 'Gareth': 74, 'Helen': 74, 'Laura': 91, 'Simon': 47}"
]
},
"execution_count": 196,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"AllGroupResults['Group C']"
]
......@@ -586,22 +480,11 @@
},
{
"cell_type": "code",
"execution_count": 197,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"91"
]
},
"execution_count": 197,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"AllGroupResults['Group C']['Laura']"
]
......@@ -685,23 +568,11 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'AllGroupResults' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-35-6fcd1fe26c5f>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# This is my solution. To be removed.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mmyName\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'Toby Hodges'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mgroup\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msorted\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mAllGroupResults\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkeys\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mstudent\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mAllGroupResults\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mgroup\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Dear {},'\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstudent\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mNameError\u001b[0m: name 'AllGroupResults' is not defined"
]
}
],
"outputs": [],
"source": [
"# This is my solution. To be removed.\n",
"myName = 'Toby Hodges'\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment