Skip to content

Commit 013c2b3

Browse files
author
giumas
committed
changes after OOP review
1 parent b356659 commit 013c2b3

9 files changed

+10
-10
lines changed

OOP_000_First_Steps_of_a_Class.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"source": [
5252
"<img align=\"left\" width=\"6%\" style=\"padding-right:10px;\" src=\"images/info.png\">\n",
5353
"\n",
54-
"To review the concept of type in Python, read the [*Variable and Types*](../python_basics/001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type) notebook."
54+
"To review the concept of the data type of a variable in Python, read the [*Variable and Types*](../python_basics/001_Variables_and_Types.ipynb#Dynamic-Nature-of-a-Variable-Type) notebook."
5555
]
5656
},
5757
{
@@ -127,7 +127,7 @@
127127
"cell_type": "markdown",
128128
"metadata": {},
129129
"source": [
130-
"Similarly to what is described in [*Class Definition*](../python_basics/008_A_Class_as_a_Data_Container.ipynb#Class-Definition), we start by creating a class definition. In this case, the class will be named `WaterLevel` and will have a `\"\"\"A Class for Water Level Data\"\"\"` docstring."
130+
"Similarly to what is described in the [*Class Definition*](../python_basics/008_A_Class_as_a_Data_Container.ipynb#Class-Definition) notebook, we start by creating a class definition. In this case, the class will be named `WaterLevel` and will have a `\"\"\"A Class for Water Level Data\"\"\"` docstring."
131131
]
132132
},
133133
{
@@ -216,7 +216,7 @@
216216
"from solutions.waterlevel_attributes import WaterLevel\n",
217217
"\n",
218218
"wl = WaterLevel()\n",
219-
"print(\"Epochs: %s, %s\" % (wl.epochs, wl.water_levels))\n",
219+
"print(\"Times: %s, %s\" % (wl.times, wl.water_levels))\n",
220220
"print(\"Metadata: %s\" % (wl.metadata))"
221221
]
222222
},
@@ -229,7 +229,7 @@
229229
"from mycode.waterlevel import WaterLevel\n",
230230
"\n",
231231
"wl = WaterLevel()\n",
232-
"print(\"Epochs: %s, %s\" % (wl.epochs, wl.water_levels))\n",
232+
"print(\"Times: %s, %s\" % (wl.times, wl.water_levels))\n",
233233
"print(\"Metadata: %s\" % (wl.metadata))"
234234
]
235235
},

OOP_001_More_About_Classes.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"cell_type": "markdown",
5252
"metadata": {},
5353
"source": [
54-
"But first, please execute the following code, for the smae reasons explained at the beginning of the previous notebook."
54+
"But first, please execute the following code, for the same reasons explained at the beginning of the previous notebook."
5555
]
5656
},
5757
{
@@ -96,7 +96,7 @@
9696
"cell_type": "markdown",
9797
"metadata": {},
9898
"source": [
99-
"Although you can directly modifies the class attributes (and, thus, the class state), the proper way to proceed is to define the so-called **class interface**."
99+
"Although you can directly modify the class attributes (and, thus, the class state), the proper way to proceed is to define the so-called **class interface**."
100100
]
101101
},
102102
{
@@ -128,7 +128,7 @@
128128
"cell_type": "markdown",
129129
"metadata": {},
130130
"source": [
131-
"As a first example of an interface method, we will add a `read(self)`. \n",
131+
"As a first step to build a class interface, we will create a `read(self)` method. \n",
132132
"\n",
133133
"This method will perform similar operations to what was described in the [Read and Write Text Files notebook](../python_basics/006_Read_and_Write_Text_Files), but using the internal class attributes."
134134
]
56.3 KB
Loading

images/ferrari.png

448 KB
Loading

images/lassie.png

162 KB
Loading

images/resources/resources.pptx

1.33 MB
Binary file not shown.

images/whitehouse.png

709 KB
Loading

index.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
"cell_type": "markdown",
1919
"metadata": {},
2020
"source": [
21-
"Ocean [data science](https://en.wikipedia.org/wiki/Data_science) is a broad and interdisciplinary topic that requires statistical and modeling knowledge as well as computer science skills, coupled with domain-specific expertise. "
21+
"Ocean [data science](https://en.wikipedia.org/wiki/Data_science) is a broad and interdisciplinary topic that requires statistical and modeling knowledge as well as computer science skills, coupled with expertise in ocean mapping. "
2222
]
2323
},
2424
{
2525
"cell_type": "markdown",
2626
"metadata": {},
2727
"source": [
28-
"As you can imagine, it would be an overwhelming goal to cover all the aspects of ocean data science, and there will likely be many cross-overs with material covered in other courses. The [*Foundations of Ocean Data Science* notebooks](https://github.com/hydroffice/ocean_data_science) will only teach you a selected number of basic concepts in ocean data science and will introduce some popular Python libraries related to the subject. This will help you to prepare you for coming assignments (for this and other courses) and your own research. "
28+
"It would take an overwhelming amount of work to cover all the aspects of ocean data science, and there are many cross-overs with material covered in other courses. The [*Foundations of Ocean Data Science* notebooks](https://github.com/hydroffice/ocean_data_science) will only teach you a selected number of basic concepts in ocean data science and will introduce some popular Python libraries related to the subject. This will help you to prepare you for coming assignments (for this and other courses) and your own research. "
2929
]
3030
},
3131
{

solutions/waterlevel_read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def read(self):
2727
# Open, read the content, and close the file
2828
wl_file = open(self.data_path)
2929
wl_content = wl_file.read()
30-
wl_file.close
30+
wl_file.close()
3131

3232
# Tokenize the contents
3333
wl_lines = wl_content.splitlines()

0 commit comments

Comments
 (0)