diff --git a/_sources/book/about/instructor.ipynb b/_sources/book/about/instructor.ipynb index e9a5cf5..b478f27 100644 --- a/_sources/book/about/instructor.ipynb +++ b/_sources/book/about/instructor.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "daa7fc19", + "id": "7281a93b", "metadata": {}, "source": [ "## Instructor\n", diff --git a/_sources/book/about/schedule.ipynb b/_sources/book/about/schedule.ipynb index 11433ee..04cdf4b 100644 --- a/_sources/book/about/schedule.ipynb +++ b/_sources/book/about/schedule.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0bd39b97", + "id": "0d85e559", "metadata": {}, "source": [ "# Schedule\n", diff --git a/_sources/book/about/syllabus.ipynb b/_sources/book/about/syllabus.ipynb index 9dd1361..1881831 100644 --- a/_sources/book/about/syllabus.ipynb +++ b/_sources/book/about/syllabus.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e9fe9e20", + "id": "a52768a9", "metadata": {}, "source": [ "# Syllabus\n", diff --git a/_sources/book/python/05_looping.ipynb b/_sources/book/python/05_looping.ipynb index 6361b40..54afd69 100644 --- a/_sources/book/python/05_looping.ipynb +++ b/_sources/book/python/05_looping.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "91ffda66", + "id": "0", "metadata": {}, "source": [ "# Looping and Control Statements\n", @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "9213dfda", + "id": "1", "metadata": {}, "source": [ "## For Loops\n", @@ -23,7 +23,7 @@ { "cell_type": "code", "execution_count": null, - "id": "34de8cdc", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -39,7 +39,7 @@ }, { "cell_type": "markdown", - "id": "bc327139", + "id": "3", "metadata": {}, "source": [ "## While Loops\n", @@ -50,7 +50,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c1320d7", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "112a434e", + "id": "5", "metadata": {}, "source": [ "## Control Statements: if, elif, else\n", @@ -74,7 +74,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c27e773", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -89,7 +89,7 @@ }, { "cell_type": "markdown", - "id": "2afbaf30", + "id": "7", "metadata": {}, "source": [ "## Combining Loops and Control Statements\n", @@ -100,7 +100,7 @@ { "cell_type": "code", "execution_count": null, - "id": "228a8ab4", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "6055fce9", + "id": "9", "metadata": {}, "source": [ "## Exercises\n", @@ -127,7 +127,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f41b987", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -136,7 +136,7 @@ }, { "cell_type": "markdown", - "id": "1f86a36d", + "id": "11", "metadata": {}, "source": [ "## Conclusion\n", diff --git a/_sources/book/python/06_functions_classes.ipynb b/_sources/book/python/06_functions_classes.ipynb index a55374a..76437fd 100644 --- a/_sources/book/python/06_functions_classes.ipynb +++ b/_sources/book/python/06_functions_classes.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "25fc002b", + "id": "0", "metadata": {}, "source": [ "# Functions and Classes\n", @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "7eb049f7", + "id": "1", "metadata": {}, "source": [ "## Functions\n", @@ -25,7 +25,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1e54592b", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -52,7 +52,7 @@ }, { "cell_type": "markdown", - "id": "ecdbab4d", + "id": "3", "metadata": {}, "source": [ "## Classes\n", @@ -65,7 +65,7 @@ { "cell_type": "code", "execution_count": null, - "id": "711b828d", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -95,7 +95,7 @@ }, { "cell_type": "markdown", - "id": "ee39b496", + "id": "5", "metadata": {}, "source": [ "## Combining Functions and Classes\n", @@ -106,7 +106,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fcb4083d", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "6fd20754", + "id": "7", "metadata": {}, "source": [ "## Exercises\n", @@ -150,7 +150,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64862cb4", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -159,7 +159,7 @@ }, { "cell_type": "markdown", - "id": "754f6aad", + "id": "9", "metadata": {}, "source": [ "## Conclusion\n", diff --git a/_sources/book/python/07_files.ipynb b/_sources/book/python/07_files.ipynb index 06d4ac2..996757c 100644 --- a/_sources/book/python/07_files.ipynb +++ b/_sources/book/python/07_files.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "bd9281e8", + "id": "0", "metadata": {}, "source": [ "# Files and Exception Handling\n", @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "4688fd0c", + "id": "1", "metadata": {}, "source": [ "## Working with Files\n", @@ -23,21 +23,21 @@ { "cell_type": "code", "execution_count": null, - "id": "99f49bf3", + "id": "2", "metadata": {}, "outputs": [], "source": [ "# Example of reading coordinates from a file and writing to another file\n", - "input_file = 'coordinates.txt'\n", - "output_file = 'output_coordinates.txt'\n", + "input_file = \"coordinates.txt\"\n", + "output_file = \"output_coordinates.txt\"\n", "\n", "try:\n", - " with open(input_file, 'r') as infile:\n", + " with open(input_file, \"r\") as infile:\n", " coordinates = infile.readlines()\n", "\n", - " with open(output_file, 'w') as outfile:\n", + " with open(output_file, \"w\") as outfile:\n", " for line in coordinates:\n", - " lat, lon = line.strip().split(',')\n", + " lat, lon = line.strip().split(\",\")\n", " outfile.write(f\"Latitude: {lat}, Longitude: {lon}\\n\")\n", "\n", " print(f\"Coordinates have been written to {output_file}\")\n", @@ -47,7 +47,7 @@ }, { "cell_type": "markdown", - "id": "9b45f27a", + "id": "3", "metadata": {}, "source": [ "## Exception Handling\n", @@ -60,14 +60,14 @@ { "cell_type": "code", "execution_count": null, - "id": "28667722", + "id": "4", "metadata": {}, "outputs": [], "source": [ "# Example of exception handling when parsing coordinates\n", "def parse_coordinates(line):\n", " try:\n", - " lat, lon = line.strip().split(',')\n", + " lat, lon = line.strip().split(\",\")\n", " lat = float(lat)\n", " lon = float(lon)\n", " return lat, lon\n", @@ -80,7 +80,7 @@ "\n", "\n", "# Example usage\n", - "line = 'invalid data'\n", + "line = \"invalid data\"\n", "coordinates = parse_coordinates(line)\n", "if coordinates:\n", " print(f\"Parsed coordinates: {coordinates}\")" @@ -88,7 +88,7 @@ }, { "cell_type": "markdown", - "id": "ddaae43c", + "id": "5", "metadata": {}, "source": [ "## Combining File Handling and Exception Handling\n", @@ -99,14 +99,14 @@ { "cell_type": "code", "execution_count": null, - "id": "1c7b2f02", + "id": "6", "metadata": {}, "outputs": [], "source": [ "# Example of robust file handling with exceptions\n", "def process_geospatial_file(input_file):\n", " try:\n", - " with open(input_file, 'r') as infile:\n", + " with open(input_file, \"r\") as infile:\n", " for line in infile:\n", " coordinates = parse_coordinates(line)\n", " if coordinates:\n", @@ -120,12 +120,12 @@ "\n", "\n", "# Example usage\n", - "process_geospatial_file('coordinates.txt')" + "process_geospatial_file(\"coordinates.txt\")" ] }, { "cell_type": "markdown", - "id": "e4dd10c0", + "id": "7", "metadata": {}, "source": [ "## Exercises\n", @@ -138,7 +138,7 @@ { "cell_type": "code", "execution_count": null, - "id": "834a4ace", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "ec3ddcea", + "id": "9", "metadata": {}, "source": [ "## Conclusion\n", diff --git a/_sources/book/software/miniconda.ipynb b/_sources/book/software/miniconda.ipynb index f857bf7..8da27f7 100644 --- a/_sources/book/software/miniconda.ipynb +++ b/_sources/book/software/miniconda.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "fa64132c", + "id": "21aa2614", "metadata": {}, "source": [ "# Miniconda\n", diff --git a/_sources/book/software/overview.ipynb b/_sources/book/software/overview.ipynb index ae7f955..8b9f345 100644 --- a/_sources/book/software/overview.ipynb +++ b/_sources/book/software/overview.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7c334ad9", + "id": "3bf85fb0", "metadata": {}, "source": [ "# Overview\n", diff --git a/book/python/03_data_structures.html b/book/python/03_data_structures.html index 5ceb717..7e658e2 100644 --- a/book/python/03_data_structures.html +++ b/book/python/03_data_structures.html @@ -600,7 +600,7 @@

3.3. Sets -
Updated regions: {'North America', 'Asia', 'Africa', 'Europe'}
+
Updated regions: {'Asia', 'Europe', 'North America', 'Africa'}
 
@@ -614,7 +614,7 @@

3.3. Sets -
Regions after attempting to add duplicate: {'North America', 'Asia', 'Africa', 'Europe'}
+
Regions after attempting to add duplicate: {'Asia', 'Europe', 'North America', 'Africa'}
 
diff --git a/book/python/07_files.html b/book/python/07_files.html index 0d43759..a85e0fe 100644 --- a/book/python/07_files.html +++ b/book/python/07_files.html @@ -510,16 +510,16 @@

7.1. Working with Files
# Example of reading coordinates from a file and writing to another file
-input_file = 'coordinates.txt'
-output_file = 'output_coordinates.txt'
+input_file = "coordinates.txt"
+output_file = "output_coordinates.txt"
 
 try:
-    with open(input_file, 'r') as infile:
+    with open(input_file, "r") as infile:
         coordinates = infile.readlines()
 
-    with open(output_file, 'w') as outfile:
+    with open(output_file, "w") as outfile:
         for line in coordinates:
-            lat, lon = line.strip().split(',')
+            lat, lon = line.strip().split(",")
             outfile.write(f"Latitude: {lat}, Longitude: {lon}\n")
 
     print(f"Coordinates have been written to {output_file}")
@@ -544,7 +544,7 @@ 

7.2. Exception Handling