Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/Python3_Jupyter_Notebook.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 54 additions & 54 deletions PythonIntro.ipynb
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# An Introduction To Scripting in Python 3\n",
"By __[Hans van der Kwast](http://www.linkedin.com/in/jvdkwast)__<br>\n",
"__[IHE Delft Institute for Water Education](http://www.un-ihe.org)__<br>\n",
"Twitter: @hansakwast\n",
"\n",
"\n",
"## Contents\n",
"### __[Lesson 1: Very Simple Programs](PythonIntroCh1.ipynb)__\n",
"### __[Lesson 2: Programs in a file, variables and strings](PythonIntroCh2.ipynb)__\n",
"### __[Lesson 3: Loops, Loops, Loops, Loops...](PythonIntroCh3.ipynb)__\n",
"### __[Lesson 4: Functions](PythonIntroCh4.ipynb)__\n",
"### __[Lesson 5: Tuples, Lists, and Dictionaries](PythonIntroCh5.ipynb)__\n",
"### __[Lesson 6: For Loop](PythonIntroCh6.ipynb)__\n",
"### __[Lesson 7: Classes](PythonIntroCh7.ipynb)__\n",
"### __[Lesson 8: Modules](PythonIntroCh8.ipynb)__\n",
"### __[Lesson 9: File I/O](PythonIntroCh9.ipynb)__\n",
"### __[Lesson 10: Exception Handling](PythonIntroCh10.ipynb)__\n",
"<br>\n",
"<br>\n",
"\n",
"*This Jupyter Notebook has been developed based on \"A Beginner's Python Tutorial\" by Steven Thurlow. The __[original material](https://github.com/stoive/pythontutorial)__ has been ported to Python 3.*\n",
"\n",
"*This work is licensed under the Creative Commons Attribution 2.5 Australia License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/au/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.*"
]
}
],
"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.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# An Introduction To Scripting in Python 3\n",
"By __[Hans van der Kwast](http://www.linkedin.com/in/jvdkwast)__<br>\n",
"__[IHE Delft Institute for Water Education](http://www.un-ihe.org)__<br>\n",
"X (Formerly Twitter): @hansakwast\n",
"\n",
"\n",
"## Contents\n",
"### __[Lesson 1: Very Simple Programs](PythonIntroCh1.ipynb)__\n",
"### __[Lesson 2: Programs in a file, variables and strings](PythonIntroCh2.ipynb)__\n",
"### __[Lesson 3: Loops, Loops, Loops, Loops...](PythonIntroCh3.ipynb)__\n",
"### __[Lesson 4: Functions](PythonIntroCh4.ipynb)__\n",
"### __[Lesson 5: Tuples, Lists, and Dictionaries](PythonIntroCh5.ipynb)__\n",
"### __[Lesson 6: For Loop](PythonIntroCh6.ipynb)__\n",
"### __[Lesson 7: Classes](PythonIntroCh7.ipynb)__\n",
"### __[Lesson 8: Modules](PythonIntroCh8.ipynb)__\n",
"### __[Lesson 9: File I/O](PythonIntroCh9.ipynb)__\n",
"### __[Lesson 10: Exception Handling](PythonIntroCh10.ipynb)__\n",
"<br>\n",
"<br>\n",
"\n",
"*This Jupyter Notebook has been developed based on \"A Beginner's Python Tutorial\" by Steven Thurlow. The __[original material](https://github.com/stoive/pythontutorial)__ has been ported to Python 3.*\n",
"\n",
"*This work is licensed under the Creative Commons Attribution 2.5 Australia License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/au/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.*"
]
}
],
"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.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
11 changes: 5 additions & 6 deletions PythonIntroCh1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
"source": [
"# 1. Very simple 'programs'\n",
"## 1.1 Running Python from the command line\n",
"In order to test pieces of code we can run Python from the command line. In this Jupyter Notebook we are going to simulate this. You can type the commands in the fields and execute them.<br>\n",
"In order to test pieces of code, we can run Python from the command line. In this Jupyter Notebook, we are going to simulate this. You can type the commands in the fields and execute them.<br>\n",
"In the field type:<br>\n",
"```python\n",
"print('Hello, World')\n",
"```\n",
"Then press `<shift> + <return>` to execute the command.\n",
"\n"
"Then press <kbd>Shift</kbd> + <kbd>Return</kbd> to execute the command."
]
},
{
Expand All @@ -35,7 +34,7 @@
"source": [
"What happened?\n",
"\n",
"You just created a program, that prints the words 'Hello, World'. The Python environment that you are in immediately compiles whatever you have typed in. This is useful for testing things, e.g. define a few variables, and then test to see if a certain line will work. That will come in a later lesson, though."
"You just created a program that prints the words 'Hello, World'. The Python environment that you are in immediately compiles whatever you have typed in. This is useful for testing things, e.g. define a few variables, and then test to see if a certain line will work. That will come in a later lesson, though."
]
},
{
Expand Down Expand Up @@ -178,7 +177,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This demonstrates that you can print text and calculations in a sentence. The commas separating each section are a way of separating strings (text) from calculations or variable."
"This demonstrates that you can print text and calculations in a sentence. The commas separating each section are a way of separating strings (text) from calculations or variables."
]
},
{
Expand Down Expand Up @@ -233,7 +232,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Remember that thing called order of operation that they taught in maths? Well, it applies in Python, too. Here it is, if you need reminding:<br>\n",
"Remember that thing called the order of operations that they taught in maths? Well, it applies in Python, too. Here it is, if you need reminding:<br>\n",
"1. Parenthesis `()`\n",
"2. Exponents `**`\n",
"3. Multiplication `*`, division `/` and remainder `%`\n",
Expand Down
Loading