Commit ad99b6e2 authored by Toby Hodges's avatar Toby Hodges

Merge branch 'corrections' into 'master'

Small corrections after proofreading

The small mistakes I found when reading the handout and some minor additions.

See merge request !10
parents a45af382 31b96ee0
......@@ -631,7 +631,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Dictionaries themselves are a mutant datatype, so the values associated with a key can be changed:"
"Dictionaries themselves are a mutable datatype, so the values associated with a key can be changed:"
]
},
{
......
......@@ -182,8 +182,8 @@
"source": [
"AllGroups = [ GroupA , GroupB , GroupC ]\n",
"# This is equivalent to the below, but much easier to read!\n",
"AllGroups = [ ['Sarah', 'Richard', 'Matthew', 'Fiona', 'Sally', 'Samuel'] , \\\n",
" ['Richard', 'Sally', 'Sandy', 'Peter', 'Rebecca', 'Steve', 'Lesley', 'Stuart'] , \\\n",
"AllGroups = [ ['Sarah', 'Richard', 'Matthew', 'Fiona', 'Sally', 'Samuel'] ,\n",
" ['Richard', 'Sally', 'Sandy', 'Peter', 'Rebecca', 'Steve', 'Lesley', 'Stuart'] ,\n",
" ['Simon', 'Laura', 'Gareth', 'Alan', 'Helen'] ]"
]
},
......@@ -250,8 +250,8 @@
},
"outputs": [],
"source": [
"AllGroups = { 'Group A': GroupA, \\\n",
" 'Group B': GroupB, \\\n",
"AllGroups = { 'Group A': GroupA,\n",
" 'Group B': GroupB,\n",
" 'Group C': GroupC }"
]
},
......@@ -454,24 +454,24 @@
},
"outputs": [],
"source": [
"GroupA_Results = { 'Sarah' : 78 ,\\\n",
" 'Richard': 65 ,\\\n",
" 'Matthew': 53 ,\\\n",
" 'Fiona' : 71 ,\\\n",
" 'Sally' : 43 ,\\\n",
"GroupA_Results = { 'Sarah' : 78 ,\n",
" 'Richard': 65 ,\n",
" 'Matthew': 53 ,\n",
" 'Fiona' : 71 ,\n",
" 'Sally' : 43 ,\n",
" 'Samuel' : 80 }\n",
"GroupB_Results = { 'Richard': 57 ,\\\n",
" 'Sally' : 89 ,\\\n",
" 'Sandy' : 65 ,\\\n",
" 'Peter' : 77 ,\\\n",
" 'Rebecca': 62 ,\\\n",
" 'Steve' : 71 ,\\\n",
" 'Lesley' : 75 ,\\\n",
"GroupB_Results = { 'Richard': 57 ,\n",
" 'Sally' : 89 ,\n",
" 'Sandy' : 65 ,\n",
" 'Peter' : 77 ,\n",
" 'Rebecca': 62 ,\n",
" 'Steve' : 71 ,\n",
" 'Lesley' : 75 ,\n",
" 'Stuart' : 80 }\n",
"GroupC_Results = { 'Simon' : 47 ,\\\n",
" 'Laura' : 91 ,\\\n",
" 'Gareth' : 74 ,\\\n",
" 'Alan' : 61 ,\\\n",
"GroupC_Results = { 'Simon' : 47 ,\n",
" 'Laura' : 91 ,\n",
" 'Gareth' : 74 ,\n",
" 'Alan' : 61 ,\n",
" 'Helen' : 74 }"
]
},
......@@ -490,8 +490,8 @@
},
"outputs": [],
"source": [
"AllGroupResults = { 'Group A' : GroupA_Results ,\\\n",
" 'Group B' : GroupB_Results ,\\\n",
"AllGroupResults = { 'Group A' : GroupA_Results ,\n",
" 'Group B' : GroupB_Results ,\n",
" 'Group C' : GroupC_Results }"
]
},
......
......@@ -340,7 +340,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"That’s solved the first problem. The second issue here is the data types. Type the following at the Python shell prompt:"
"That solved the first problem. The second issue here is the data types. Type the following at the Python shell prompt:"
]
},
{
......@@ -747,7 +747,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In our case, though, we want to start by creating a new figure (this is actually optional, but good practice - remember Python says “Explicit is better that implicit”)."
"In our case, though, we want to start by creating a new figure (this is actually optional, but good practice - Python says “Explicit is better that implicit” - Try: `import this`)."
]
},
{
......
......@@ -17,6 +17,7 @@
"- [http://awesome-python.com](http://awesome-python.com) - A curated list of awesome Python frameworks, libraries, software and resources \n",
"- [https://github.com/rasbt/python_reference](https://github.com/rasbt/python_reference) - Useful functions, tutorials, and other Python-related things \n",
"- [http://stackoverflow.com/questions/tagged/python](http://stackoverflow.com/questions/tagged/python) - Search a history of thousands of questions and answers from frustrated programmers\n",
"- [http://pythontutor.com](http://pythontutor.com) - Visually inspect what happens when running Python step by step.\n",
"\n",
"### Books\n",
"- [http://www.onlineprogrammingbooks.com/python](http://www.onlineprogrammingbooks.com/python)\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