diff --git a/000_Welcome_on_Board.ipynb b/000_Welcome_on_Board.ipynb
index 445b996..b81099c 100644
--- a/000_Welcome_on_Board.ipynb
+++ b/000_Welcome_on_Board.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Welcome on Board!"
]
},
@@ -114,7 +113,7 @@
"source": [
"
\n",
"\n",
- "[Python](http://www.python.org/) is a [very popular](https://www.economist.com/graphic-detail/2018/07/26/python-is-becoming-the-worlds-most-popular-coding-language) programming language with applications [across different fields](https://www.python.org/about/apps/)."
+ "[Python](http://www.python.org/) is a [very popular](https://spectrum.ieee.org/top-programming-languages-2021) programming language with applications [across different fields](https://www.python.org/about/apps/)."
]
},
{
@@ -155,7 +154,7 @@
"source": [
"
\n",
"\n",
- "Python has being constantly improved in the part years. These notebooks **only** use the latest version of the language: **Python 3**. The past version of the language, [**Python 2**](https://pythonclock.org/), will *retire* soon and no longer be maintained! Thus, when searching online for help, make sure the results refer to **Python 3**."
+ "Python has being constantly improved in the past years. These notebooks **only** use the latest version of the language: **Python 3**. As of January 1st, 2020, [**Python 2**](https://www.python.org/doc/sunset-python-2/) has officially reached the end of life and will no longer receive security updates, bug fixes, or other improvements going forward! Thus, when searching online for help, make sure the results refer to **Python 3**."
]
},
{
@@ -665,84 +664,6 @@
"***"
]
},
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Questions or Comments?"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "These notebooks have a virtual gathering place on [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe) where you can ask (but also answer!) questions to instructors and fellow students."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "
"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "
\n",
- "\n",
- "A red megaphone at the top-right corner of each notebook provides a link to [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe). "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "You can learn more about Piazza.com by watching [this video](https://www.youtube.com/watch?v=2jLSiN8E18w)."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "If you click on this [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe) link, you can register yourself as a student to access the virtual gathering place.\n",
- "\n",
- "Once registered, what about introducing yourself to the community?"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "solution2": "hidden",
- "solution2_first": true
- },
- "source": [
- "
\n",
- "\n",
- "Add a note containing your self-introduction in the \"community\" folder on [Piazza.com](https://piazza.com/class/js5dnu0q39n6qe). The following image shows how to do it in eight steps. Feel free to customize the text in the note as you prefer!\n",
- "
\n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "solution2": "hidden"
- },
- "source": [
- "If you follow the eight steps, the result will be a note similar to the following one (but with your specific details):\n",
- "\n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "***"
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
@@ -758,8 +679,6 @@
"source": [
"- [The Python website](http://www.python.org/)\n",
"- [PEP8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/)\n",
- "- [Python 2 End of Life Clock](https://pythonclock.org/)\n",
- "- [The official introductory notebooks for Jupyter Notebooks](https://nbviewer.jupyter.org/github/jupyter/notebook/tree/master/docs/source/examples/Notebook/)\n",
"- [The Jupyter Notebook manual](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html)\n",
"\n",
" - [Browser compatibility](https://jupyter-notebook.readthedocs.io/en/stable/notebook.html#browser-compatibility)\n",
diff --git a/001_Variables_and_Types.ipynb b/001_Variables_and_Types.ipynb
index 33ffe84..373db70 100644
--- a/001_Variables_and_Types.ipynb
+++ b/001_Variables_and_Types.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Variables and Types"
]
},
@@ -50,10 +49,10 @@
"metadata": {},
"source": [
"For instance:\n",
- "- `ocean_mapping_2019` is a valid variable name.\n",
- "- `Ocean_mapping_2019` is a valid variable, but does not follow the convention because it starts with an uppercase `O`.\n",
- "- `ocean_mapping_2019` and `Ocean_mapping_2019` are **different** variables that are both valid. However, it is a bad habit to have variables that are only different in the letter case.\n",
- "- `2019_ocean_mapping` will **not** work because it has `2` as first character. "
+ "- `ocean_mapping_2022` is a valid variable name.\n",
+ "- `Ocean_mapping_2022` is a valid variable, but does not follow the convention because it starts with an uppercase `O`.\n",
+ "- `ocean_mapping_2022` and `Ocean_mapping_2022` are **different** variables that are both valid. However, it is a bad habit to have variables that are only different in the letter case.\n",
+ "- `2022_ocean_mapping` will **not** work because it has `2` as first character. "
]
},
{
@@ -213,7 +212,7 @@
"source": [
"
\n",
"\n",
- "An extensive documentation explains the functions in the Python standard library. For instance, follow [this link](https://docs.python.org/3.6/library/functions.html?#type) to learn more about the `type()` function. "
+ "An extensive documentation explains the functions in the Python standard library. For instance, follow [this link](https://docs.python.org/3.9/library/functions.html?#type) to learn more about the `type()` function. "
]
},
{
@@ -562,7 +561,7 @@
"source": [
"
\n",
"\n",
- "You can read more about operator precedence in the official [Python documentation](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)."
+ "You can read more about operator precedence in the official [Python documentation](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)."
]
},
{
@@ -857,7 +856,7 @@
"source": [
"
\n",
"\n",
- "Create a `cur_year` variable of type `int`. Use `cur_year` to create a string variable, then display: `The current year is 2019`."
+ "Create a `cur_year` variable of type `int`. Use `cur_year` to create a string variable, then display: `The current year is 2022`."
]
},
{
@@ -868,7 +867,7 @@
},
"outputs": [],
"source": [
- "cur_year = 2019\n",
+ "cur_year = 2022\n",
"cur_year_str = \"The current year is \" + str(cur_year)\n",
"print(cur_year_str)"
]
@@ -1019,9 +1018,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [Python Built-in Types](https://docs.python.org/3.6/library/stdtypes.html)\n",
- " * [Order of Precedence for Operators](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [Python Built-in Types](https://docs.python.org/3.9/library/stdtypes.html)\n",
+ " * [Order of Precedence for Operators](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)\n",
"* [Euclidean division](https://en.wikipedia.org/wiki/Euclidean_division)\n",
"* [PEMDAS mathematical convention](https://en.wikipedia.org/wiki/Order_of_operations)"
]
diff --git a/002_Lists_of_Variables.ipynb b/002_Lists_of_Variables.ipynb
index 30627ed..208a477 100644
--- a/002_Lists_of_Variables.ipynb
+++ b/002_Lists_of_Variables.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Lists of Variables"
]
},
@@ -607,7 +606,7 @@
"source": [
"
\n",
"\n",
- "The [`dir()`](https://docs.python.org/3.6/library/functions.html#dir) function can be used to explore the methods available for a variable."
+ "The [`dir()`](https://docs.python.org/3.9/library/functions.html#dir) function can be used to explore the methods available for a variable."
]
},
{
@@ -764,8 +763,8 @@
"source": [
"
\n",
"\n",
- "A `list` implements all of the so-called [*common*](https://docs.python.org/3.6/library/stdtypes.html?#typesseq-common) and [*mutable sequence operations*](https://docs.python.org/3.6/library/stdtypes.html?#mutable-sequence-types).\n",
- "If you are curious to know more about the methods available for a `list`, look at this [section](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists) of the official Python documentation."
+ "A `list` implements all of the so-called [*common*](https://docs.python.org/3.9/library/stdtypes.html?#typesseq-common) and [*mutable sequence operations*](https://docs.python.org/3.9/library/stdtypes.html?#mutable-sequence-types).\n",
+ "If you are curious to know more about the methods available for a `list`, look at this [section](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists) of the official Python documentation."
]
},
{
@@ -788,10 +787,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [Common Sequence Operations](https://docs.python.org/3.6/library/stdtypes.html?#typesseq-common)\n",
- " * [Mutable Sequence Operations](https://docs.python.org/3.6/library/stdtypes.html?#mutable-sequence-types)\n",
- " * [Lists](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [Common Sequence Operations](https://docs.python.org/3.9/library/stdtypes.html?#typesseq-common)\n",
+ " * [Mutable Sequence Operations](https://docs.python.org/3.9/library/stdtypes.html?#mutable-sequence-types)\n",
+ " * [Lists](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists)\n",
"* [Zero-based numbering](https://en.wikipedia.org/wiki/Zero-based_numbering)"
]
},
diff --git a/003_Conditional_Execution.ipynb b/003_Conditional_Execution.ipynb
index 504deb9..2662dce 100644
--- a/003_Conditional_Execution.ipynb
+++ b/003_Conditional_Execution.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Conditional Execution"
]
},
@@ -96,7 +95,7 @@
"source": [
"
\n",
"\n",
- "A boolean expression usually has (at least) one **[relational operators](https://docs.python.org/3.6/reference/expressions.html?#value-comparisons)** that verifies a relation between two variables."
+ "A boolean expression usually has (at least) one **[relational operators](https://docs.python.org/3.9/reference/expressions.html?#value-comparisons)** that verifies a relation between two variables."
]
},
{
@@ -194,7 +193,7 @@
"source": [
"
\n",
"\n",
- "It is possible to combine pairs of boolean expressions (**operands**) into a single one using **[logical operators](https://docs.python.org/3.6/reference/expressions.html?#boolean-operations)** such as `and` and `or`. "
+ "It is possible to combine pairs of boolean expressions (**operands**) into a single one using **[logical operators](https://docs.python.org/3.9/reference/expressions.html?#boolean-operations)** such as `and` and `or`. "
]
},
{
@@ -230,7 +229,7 @@
"source": [
"
\n",
"\n",
- "When a statement contains multiple operators, Python follows a well-defined [order of precedence](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)."
+ "When a statement contains multiple operators, Python follows a well-defined [order of precedence](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)."
]
},
{
@@ -429,7 +428,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Conditional statements like [`if`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement), [`elif`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement), and [`else`](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement) provide you with the ability to check whether specific conditions apply and change the behavior of your program accordingly."
+ "Conditional statements like [`if`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement), [`elif`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement), and [`else`](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement) provide you with the ability to check whether specific conditions apply and change the behavior of your program accordingly."
]
},
{
@@ -480,7 +479,7 @@
"source": [
"
\n",
"\n",
- "Proper [indentation](https://docs.python.org/3.6/reference/lexical_analysis.html#indentation) is a key requirement in Python."
+ "Proper [indentation](https://docs.python.org/3.9/reference/lexical_analysis.html#indentation) is a key requirement in Python."
]
},
{
@@ -789,13 +788,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [The bool type](https://docs.python.org/3.6/library/functions.html?#bool)\n",
- " * [Indentation](https://docs.python.org/3.6/reference/lexical_analysis.html#indentation)\n",
- " * [Relational Operators](https://docs.python.org/3.6/reference/expressions.html?#value-comparisons)\n",
- " * [Logical Operators](https://docs.python.org/3.6/reference/expressions.html?#boolean-operations)\n",
- " * [Order of Precedence for Operators](https://docs.python.org/3.6/reference/expressions.html#operator-precedence)\n",
- " * [The `if` statement](https://docs.python.org/3.6/reference/compound_stmts.html#the-if-statement)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [The bool type](https://docs.python.org/3.9/library/functions.html?#bool)\n",
+ " * [Indentation](https://docs.python.org/3.9/reference/lexical_analysis.html#indentation)\n",
+ " * [Relational Operators](https://docs.python.org/3.9/reference/expressions.html?#value-comparisons)\n",
+ " * [Logical Operators](https://docs.python.org/3.9/reference/expressions.html?#boolean-operations)\n",
+ " * [Order of Precedence for Operators](https://docs.python.org/3.9/reference/expressions.html#operator-precedence)\n",
+ " * [The `if` statement](https://docs.python.org/3.9/reference/compound_stmts.html#the-if-statement)\n",
"* [Sediment Grain Size](https://en.wikipedia.org/wiki/Grain_size)"
]
},
diff --git a/004_Loops.ipynb b/004_Loops.ipynb
index 2785e43..d7ffa24 100644
--- a/004_Loops.ipynb
+++ b/004_Loops.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Loops"
]
},
@@ -480,8 +479,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [Lists](https://docs.python.org/3.6/library/stdtypes.html?highlight=list#lists)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [Lists](https://docs.python.org/3.9/library/stdtypes.html?highlight=list#lists)\n",
"* [The Python Wiki](https://wiki.python.org/moin/FrontPage)\n",
" * [For loops](https://wiki.python.org/moin/ForLoop)\n",
" * [While loops](https://wiki.python.org/moin/WhileLoop)"
diff --git a/005_Write_Your_Own_Functions.ipynb b/005_Write_Your_Own_Functions.ipynb
index 4f16532..d95805c 100644
--- a/005_Write_Your_Own_Functions.ipynb
+++ b/005_Write_Your_Own_Functions.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Functions"
]
},
@@ -19,7 +18,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "We have met (and used) several of the many [built-in functions](https://docs.python.org/3.6/library/functions.html) that are shipped with Python: [`print()`](000_Welcome_on_Board.ipynb#What-is-a-Code-cell?), [`type()`](001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type), [`len()`](002_Lists_of_Variables.ipynb#Creation-of-a-List:-Approach-#1), [`dir()`](002_Lists_of_Variables.ipynb#List's-Methods)."
+ "We have met (and used) several of the many [built-in functions](https://docs.python.org/3.9/library/functions.html) that are shipped with Python: [`print()`](000_Welcome_on_Board.ipynb#What-is-a-Code-cell?), [`type()`](001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type), [`len()`](002_Lists_of_Variables.ipynb#Creation-of-a-List:-Approach-#1), [`dir()`](002_Lists_of_Variables.ipynb#List's-Methods)."
]
},
{
@@ -421,7 +420,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "By default, a function provides back (**returns**) a special Python object: [`None`](https://docs.python.org/3.6/c-api/none.html?highlight=none#the-none-object)."
+ "By default, a function provides back (**returns**) a special Python object: [`None`](https://docs.python.org/3.9/c-api/none.html?highlight=none#the-none-object)."
]
},
{
@@ -717,9 +716,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [Built-in functions](https://docs.python.org/3.6/library/functions.html)\n",
- " * [None](https://docs.python.org/3.6/c-api/none.html?highlight=none#the-none-object)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [Built-in functions](https://docs.python.org/3.9/library/functions.html)\n",
+ " * [None](https://docs.python.org/3.9/c-api/none.html?highlight=none#the-none-object)\n",
"* [Flattening](https://en.wikipedia.org/wiki/Flattening)"
]
},
diff --git a/006_Read_and_Write_Text_Files.ipynb b/006_Read_and_Write_Text_Files.ipynb
index 50704a8..2c82ad2 100644
--- a/006_Read_and_Write_Text_Files.ipynb
+++ b/006_Read_and_Write_Text_Files.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Read and Write Text Files"
]
},
@@ -69,7 +68,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "We will first introduce some file management capabilities of the `os.path` [Python module](https://docs.python.org/3.6/tutorial/modules.html#modules), then we will use the functions that Python provides for [reading and writing the content of a text file](https://docs.python.org/3.6/tutorial/inputoutput.html)."
+ "We will first introduce some file management capabilities of the `os.path` [Python module](https://docs.python.org/3.9/tutorial/modules.html#modules), then we will use the functions that Python provides for [reading and writing the content of a text file](https://docs.python.org/3.9/tutorial/inputoutput.html)."
]
},
{
@@ -193,7 +192,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "In case that the `data` sub-folder does not exist, we raise an error using the [`raise`](https://docs.python.org/3.6/tutorial/errors.html#raising-exceptions) keyword."
+ "In case that the `data` sub-folder does not exist, we raise an error using the [`raise`](https://docs.python.org/3.9/tutorial/errors.html#raising-exceptions) keyword."
]
},
{
@@ -235,7 +234,7 @@
"source": [
"
\n",
"\n",
- "If you want to know more about error handing and exceptions, read [Errors and Exceptions](https://docs.python.org/3.6/tutorial/errors.html)."
+ "If you want to know more about error handing and exceptions, read [Errors and Exceptions](https://docs.python.org/3.9/tutorial/errors.html)."
]
},
{
@@ -291,7 +290,7 @@
"source": [
"
\n",
"\n",
- "You do not need to remember all the names of the available Python functions, but you need to learn how to search for them. The [official Python documentation](https://docs.python.org/3.6/index.html) is a good place to start. You can also get a list of the functions in the `os.path` module by entering `dir(os.path)` in a code cell."
+ "You do not need to remember all the names of the available Python functions, but you need to learn how to search for them. The [official Python documentation](https://docs.python.org/3.9/index.html) is a good place to start. You can also get a list of the functions in the `os.path` module by entering `dir(os.path)` in a code cell."
]
},
{
@@ -349,7 +348,7 @@
"source": [
"
\n",
"\n",
- "The Python `open()` function takes the name of the file (as a parameter) and returns a [file object](https://docs.python.org/3.6/glossary.html#term-file-object).
The `close()` function closes the open file."
+ "The Python `open()` function takes the name of the file (as a parameter) and returns a [file object](https://docs.python.org/3.9/glossary.html#term-file-object).
The `close()` function closes the open file."
]
},
{
@@ -620,7 +619,7 @@
"source": [
"
\n",
"\n",
- "You may learn about other modes for opening a file from the official [Python documentation](https://docs.python.org/3.6/library/functions.html?#open)."
+ "You may learn about other modes for opening a file from the official [Python documentation](https://docs.python.org/3.9/library/functions.html?#open)."
]
},
{
@@ -737,9 +736,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [The os module](https://docs.python.org/3.6/library/os.html)\n",
- " * [Input and Output](https://docs.python.org/3.6/tutorial/inputoutput.html)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [The os module](https://docs.python.org/3.9/library/os.html)\n",
+ " * [Input and Output](https://docs.python.org/3.9/tutorial/inputoutput.html)\n",
"* [Cross-platform software](https://en.wikipedia.org/wiki/Cross-platform_software)\n",
"* [Computer file](https://en.wikipedia.org/wiki/Computer_file)\n",
" * [Text file](https://en.wikipedia.org/wiki/Text_file)\n",
diff --git a/007_Dictionaries_and_Metadata.ipynb b/007_Dictionaries_and_Metadata.ipynb
index 53c4045..6292146 100644
--- a/007_Dictionaries_and_Metadata.ipynb
+++ b/007_Dictionaries_and_Metadata.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Dictionaries"
]
},
@@ -147,7 +146,7 @@
"source": [
"
\n",
"\n",
- "A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)."
+ "A `dict` is an **unordered** container. The order of items insertion is not preserved. If you need to preserve the items order, Python provides a special dictionary called [`OrderedDict`](https://docs.python.org/3.9/library/collections.html?highlight=ordereddict#ordereddict-objects)."
]
},
{
@@ -240,7 +239,7 @@
"source": [
"
\n",
"\n",
- "In the table above, the *\"(almost) any type\"* for `dict` indexing is because the type must be [hashable](https://docs.python.org/3.6/glossary.html). For now you do not have to worry what this means as it is outside the scope of this notebook. If, however, you want to learn about the hash function go [here](https://en.wikipedia.org/wiki/Hash_function)."
+ "In the table above, the *\"(almost) any type\"* for `dict` indexing is because the type must be [hashable](https://docs.python.org/3.9/glossary.html). For now you do not have to worry what this means as it is outside the scope of this notebook. If, however, you want to learn about the hash function go [here](https://en.wikipedia.org/wiki/Hash_function)."
]
},
{
@@ -327,7 +326,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "This is the first time that we use the [`datetime`](https://docs.python.org/3.6/library/datetime.html?#module-datetime) type."
+ "This is the first time that we use the [`datetime`](https://docs.python.org/3.9/library/datetime.html?#module-datetime) type."
]
},
{
@@ -352,7 +351,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "The `datetime` constructor is part of the `datetime` module (they have the same name; see the [Python documentation](https://docs.python.org/3.6/library/datetime.html?#datetime-objects)) It takes several parameters: \n",
+ "The `datetime` constructor is part of the `datetime` module (they have the same name; see the [Python documentation](https://docs.python.org/3.9/library/datetime.html?#datetime-objects)) It takes several parameters: \n",
"\n",
"- `datetime(year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0)` \n",
"\n",
@@ -374,7 +373,7 @@
"source": [
"from datetime import datetime # imports only the datetime constructor from the datetime module\n",
"\n",
- "example_timestamp = datetime(2019, 2, 22, 12, 32, 40)\n",
+ "example_timestamp = datetime(2022, 2, 22, 12, 32, 40)\n",
"print(str(example_timestamp))"
]
},
@@ -396,8 +395,8 @@
"metadata[\"last_name\"] = \"Doe\"\n",
"metadata[\"latitude\"] = 43.135555\n",
"metadata[\"longitude\"] = -70.939534\n",
- "metadata[\"start_timestamp\"] = datetime(2019, 2, 22, 12, 32, 40)\n",
- "metadata[\"end_timestamp\"] = datetime(2019, 2, 22, 12, 34, 14)\n",
+ "metadata[\"start_timestamp\"] = datetime(2022, 2, 22, 12, 32, 40)\n",
+ "metadata[\"end_timestamp\"] = datetime(2022, 2, 22, 12, 34, 14)\n",
"\n",
"print(metadata)"
]
@@ -431,8 +430,8 @@
"source": [
"metadata = dict()\n",
"metadata[\"username\"] = \"jdoe\"\n",
- "metadata[\"begin_time\"] = datetime(2019, 2, 22, 12, 34, 20)\n",
- "metadata[\"end_time\"] = datetime(2019, 2, 22, 12, 34, 21)\n",
+ "metadata[\"begin_time\"] = datetime(2022, 2, 22, 12, 34, 20)\n",
+ "metadata[\"end_time\"] = datetime(2022, 2, 22, 12, 34, 21)\n",
"\n",
"print(metadata)"
]
@@ -500,7 +499,7 @@
"metadata = dict()\n",
"metadata[\"latitude\"] = 43.135555\n",
"metadata[\"longitude\"] = -70.939534\n",
- "metadata[\"start_timestamp\"] = datetime(2019, 2, 22, 12, 32, 40)\n",
+ "metadata[\"start_timestamp\"] = datetime(2022, 2, 22, 12, 32, 40)\n",
"\n",
"print(\"The position is: \" + str(metadata[\"latitude\"]) + \", \" + str(metadata[\"longitude\"]))\n",
"print(\"Start time: \" + str(metadata[\"start_timestamp\"]))"
@@ -536,7 +535,7 @@
"metadata = dict()\n",
"metadata[\"latitude\"] = 43.135558\n",
"metadata[\"longitude\"] = -70.939534\n",
- "metadata[\"start_timestamp\"] = datetime(2019, 2, 22, 12, 32, 40)\n",
+ "metadata[\"start_timestamp\"] = datetime(2022, 2, 22, 12, 32, 40)\n",
"\n",
"print(\"The position is: %s, %s\" % (metadata[\"latitude\"], metadata[\"longitude\"]))\n",
"print(\"Start time: %s\" % (metadata[\"start_timestamp\"]))"
@@ -558,7 +557,7 @@
"source": [
"
\n",
"\n",
- "In the above code, the values inside the rounded brackets after the `%` operator create a so-called [`tuple`](https://docs.python.org/3.6/library/stdtypes.html?#tuples).
\n",
+ "In the above code, the values inside the rounded brackets after the `%` operator create a so-called [`tuple`](https://docs.python.org/3.9/library/stdtypes.html?#tuples).
\n",
"A `tuple` is a Python container similar to a list except that you cannot modify the content after creation (an **immutable sequence**)."
]
},
@@ -566,7 +565,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "String formatting using the `%` operator provides [additional printing options](https://docs.python.org/3.6/library/stdtypes.html#printf-style-string-formatting). One of these options is to define how many decimal digits to print for a `float` value. \n",
+ "String formatting using the `%` operator provides [additional printing options](https://docs.python.org/3.9/library/stdtypes.html#printf-style-string-formatting). One of these options is to define how many decimal digits to print for a `float` value. \n",
"\n",
"For instance, by using `%.4f` as a placeholder, Python will print **only** the first four decimal digits: "
]
@@ -647,12 +646,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [Glossary](https://docs.python.org/3.6/glossary.html)\n",
- " * [Mapping Types - dict](https://docs.python.org/3.6/library/stdtypes.html#mapping-types-dict)\n",
- " * [Collections - OrderedDict](https://docs.python.org/3.6/library/collections.html?highlight=ordereddict#ordereddict-objects)\n",
- " * [`datetime`](https://docs.python.org/3.6/library/datetime.html?#module-datetime) \n",
- " * [`tuple`](https://docs.python.org/3.6/library/stdtypes.html?#tuples)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [Glossary](https://docs.python.org/3.9/glossary.html)\n",
+ " * [Mapping Types - dict](https://docs.python.org/3.9/library/stdtypes.html#mapping-types-dict)\n",
+ " * [Collections - OrderedDict](https://docs.python.org/3.9/library/collections.html?highlight=ordereddict#ordereddict-objects)\n",
+ " * [`datetime`](https://docs.python.org/3.9/library/datetime.html?#module-datetime) \n",
+ " * [`tuple`](https://docs.python.org/3.9/library/stdtypes.html?#tuples)\n",
"* [Hash function](https://en.wikipedia.org/wiki/Hash_function)\n",
"* [Metadata](https://en.wikipedia.org/wiki/Metadata)"
]
diff --git a/008_A_Class_as_a_Data_Container.ipynb b/008_A_Class_as_a_Data_Container.ipynb
index 24eb6b1..133493f 100644
--- a/008_A_Class_as_a_Data_Container.ipynb
+++ b/008_A_Class_as_a_Data_Container.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# A Class as a Data Container"
]
},
@@ -372,8 +371,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
- " * [Classes](https://docs.python.org/3.6/tutorial/classes.html)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
+ " * [Classes](https://docs.python.org/3.9/tutorial/classes.html)\n",
"* [Foundations of Ocean Data Science](https://www.hydroffice.org/manuals/epom/foundations_of_ocean_data_science.html)"
]
},
diff --git a/009_Summing-Up.ipynb b/009_Summing-Up.ipynb
index 94ae105..9c6ac2a 100644
--- a/009_Summing-Up.ipynb
+++ b/009_Summing-Up.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Summing-Up"
]
},
@@ -190,7 +189,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "In the above code we use the [`str.split()`](https://docs.python.org/3.6/library/stdtypes.html?#str.split) method. \n",
+ "In the above code we use the [`str.split()`](https://docs.python.org/3.9/library/stdtypes.html?#str.split) method. \n",
"\n",
"This method returns a list of the words in a string by splitting it using a delimiter (e.g., `\":\"`) passed as a parameter. "
]
@@ -256,7 +255,7 @@
"source": [
"The data are now **loaded in memory**. \n",
"\n",
- "We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.6/library/stdtypes.html?#range) type.\n",
+ "We can check the success of this operation by printing depths and sound speed values. We will do this by accessing the values by index with the help of the [`range()`](https://docs.python.org/3.9/library/stdtypes.html?#range) type.\n",
"\n",
"A `range()` with an integer value as single parameter represents a sequence of numbers ranging from 0 up to (but not including) the value passed as a parameter. In the code below, we use `range` with `10`:"
]
@@ -317,7 +316,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
"* [CTD instrument](https://en.wikipedia.org/wiki/CTD_(instrument))"
]
},
diff --git a/README.rst b/README.rst
index 7bc4908..7ee1e48 100644
--- a/README.rst
+++ b/README.rst
@@ -32,4 +32,4 @@ Text License
Copyright Notice
----------------
-Copyright (c) 2019, University of New Hampshire, Center for Coastal and Ocean Mapping. All rights reserved.
+Copyright (c) 2021, University of New Hampshire, Center for Coastal and Ocean Mapping. All rights reserved.
diff --git a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb
index efeb8c1..3c6934d 100644
--- a/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb
+++ b/SUP_Python_is_Dynamically_and_Strongly_Typed.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Python is Dynamically and Strongly Typed"
]
},
@@ -116,7 +115,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)\n",
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)\n",
"* [Why is Python a dynamic language and also a strongly typed language](https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language)"
]
},
diff --git a/empty.ipynb b/empty.ipynb
index 4c1c4e5..f30c3bd 100644
--- a/empty.ipynb
+++ b/empty.ipynb
@@ -11,7 +11,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "
\n",
"# Title"
]
},
@@ -81,7 +80,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "* [The official Python 3.6 documentation](https://docs.python.org/3.6/index.html)"
+ "* [The official Python 3.9 documentation](https://docs.python.org/3.9/index.html)"
]
},
{
diff --git a/index.ipynb b/index.ipynb
index 67da2a0..f8e8659 100644
--- a/index.ipynb
+++ b/index.ipynb
@@ -74,8 +74,6 @@
"\n",
"* [Semme Dijkstra](mailto:semmed@ccom.unh.edu>)\n",
"\n",
- "* [Jordan Chadwick](mailto:jordan.chadwick@gmail.com>)\n",
- "\n",
"* [Tyanne Faulkes](mailto:tyanne.faulkes@noaa.gov>)"
]
},
@@ -91,14 +89,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Version: 1.1.2"
+ "Version: 2.0.0"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "GitHub repository: [https://github.com/hydroffice/python_basics](https://github.com/hydroffice/python_basics)"
+ "GitHub repository: [https://github.com/hydroffice/python_basics/tree/epom2022](https://github.com/hydroffice/python_basics/tree/epom2022)"
]
},
{
diff --git a/requirements.txt b/requirements.txt
index 50b32ba..ff58348 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,6 +3,6 @@
gdal
jupyterhub
numpy
-python=3.6.5
+python=3.9.5
matplotlib
nbgitpuller