Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrosenzweig committed Oct 14, 2021
1 parent 3cc11c5 commit b191655
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions PCP_getstarted.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
" <tt>jupyter notebook</tt>\n",
"</div> \n",
"\n",
"This should open a browser, displaying the folder structure of the PCP notebooks. You then can open the overview notebook by selecting the file `PCP.ipynb`. You can also directly open any PCP notebook by selecting a file in any subdirectory with the file extension `.ipynb`. Within the Jupyter session, you need to follow the **IPYNB links** to keep the code cells executable. Furthermore note that, within the Jupyter session, you can only access files that are contained in the directory you used for launching the Jupyter server or in any **subdirectory**."
"This should open a browser, displaying the folder structure of the PCP notebooks. You then can open the overview notebook by selecting the file `PCP.ipynb`. You can also directly open any PCP notebook by selecting a file in any subdirectory with the file extension `.ipynb`. Within the Jupyter session, you need to follow the **IPYNB links** to keep the code cells executable. Furthermore note that, within the Jupyter session, you can only access files that are contained in the directory you used for launching the Jupyter server or in any of its **subdirectories**."
]
},
{
Expand Down Expand Up @@ -290,7 +290,7 @@
"\n",
"## Further Notes\n",
"\n",
"Here is a list of useful commands, which may be helpful when updating and starting the environment. The command will be explained in more detail in subsequent notebooks. \n",
"Here is a list of useful commands, which may be helpful when updating and starting the environment:\n",
"\n",
"<div class=\"alert alert-block alert-warning\">\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion PCP_numpy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"<div class=\"alert alert-block alert-warning\">\n",
"<h2>Overview and Learning Objectives</h2>\n",
"\n",
"Python has several useful built-in packages as well as additional external packages. One such package is <a href='https://docs.scipy.org/doc/numpy/reference/'>NumPy</a>, which adds support for multi-dimensional arrays and matrices, along with a number of mathematical functions to operate on these structures. This unit covers array objects as the most fundamental NumPy data structure along with important NumPy array operations. Furthermore, we discuss numerical types, methods for type conversion, and constants (including the constants `nan` and `inf`) offered by NumPy. The three exercises offered at the end of this unit cover key aspects needed throughout the PCP notebooks. Therefore, we encourage students to work through these exercises carefully. In particular, we <a href='#recap_matrix'>recapitulate the mathematical concept of matrices and matrix multiplication</a>, before we cover these aspects in <a href='#exercise_matrix_operation'>Exercise 2</a> from an implementation perspective. We believe that understanding both&mdash;the mathematical formulation of abstract concepts and their realization in a programming context&mdash;is key in engineering education. This philosophy also forms the basis of the PCP notebooks to follow. \n",
"Python has several useful built-in packages as well as additional external packages. One such package is <a href='https://docs.scipy.org/doc/numpy/reference/'>NumPy</a>, which adds support for multi-dimensional arrays and matrices, along with a number of mathematical functions to operate on these structures. This unit covers array objects as the most fundamental NumPy data structure along with important NumPy array operations. Furthermore, we discuss numerical types, methods for type conversion, and constants (including the constants `nan` and `inf`) offered by NumPy. The three exercises included at the end of this unit cover key aspects needed throughout the PCP notebooks. Therefore, we encourage students to work through these exercises carefully. In particular, we <a href='#recap_matrix'>recapitulate the mathematical concept of matrices and matrix multiplication</a>, before we cover these aspects in <a href='#exercise_matrix_operation'>Exercise 2</a> from an implementation perspective. We believe that understanding both&mdash;the mathematical formulation of abstract concepts and their realization in a programming context&mdash;is key in engineering education. This philosophy also forms the basis of the PCP notebooks to follow. \n",
" \n",
"</div> "
]
Expand Down
26 changes: 14 additions & 12 deletions PCP_python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"## Basic Facts\n",
"\n",
"* Python is an interpreted (not compiled), open-source, multi-platform programming language.\n",
"* There exist a set of modules for scientific computing (e.g. `numpy`, `scipy`, `matplotlib`, `librosa`) in Python.\n",
"* There exist several modules for scientific computing (e.g. `numpy`, `scipy`, `matplotlib`, `librosa`) in Python.\n",
"* Python uses indentation (and not brackets or `end`-commands) to separate blocks of code.\n",
"* Comment lines start with the character `#`.\n",
"* Useful functions for help:\n",
Expand Down Expand Up @@ -205,7 +205,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2021-09-23T10:12:03.339950Z",
Expand All @@ -221,7 +221,7 @@
"text": [
"Addition: 18\n",
"Multiplication: 36\n",
"Divivion: 2.0\n",
"Division: 2.0\n",
"Exponentiation: 1.4142135623730951\n"
]
}
Expand All @@ -235,7 +235,7 @@
"print('Multiplication:', n)\n",
"\n",
"n /= 18\n",
"print('Divivion:', n)\n",
"print('Division:', n)\n",
"\n",
"n **= 0.5\n",
"print('Exponentiation:', n)"
Expand Down Expand Up @@ -300,7 +300,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2021-09-23T10:12:03.362388Z",
Expand All @@ -315,6 +315,7 @@
"output_type": "stream",
"text": [
"Print list: [1, 2, 3]\n",
"Alternate item: [-1, 2, 3]\n",
"Append item: [-1, 2, 3, 10]\n",
"Concatenate two lists: [-1, 2, 3, 10, 'a', '12', [13, 14]]\n",
"Last element of list: [13, 14]\n",
Expand All @@ -328,6 +329,7 @@
"var_list = [1, 2, 3]\n",
"print('Print list:', var_list)\n",
"var_list[0] = -1\n",
"print('Alternate item:', var_list)\n",
"var_list.append(10)\n",
"print('Append item:', var_list)\n",
"var_list = var_list + ['a', '12', [13, 14]]\n",
Expand All @@ -350,7 +352,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2021-09-23T10:12:03.375162Z",
Expand Down Expand Up @@ -594,7 +596,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 5,
"metadata": {
"execution": {
"iopub.execute_input": "2021-09-23T10:12:03.439844Z",
Expand All @@ -611,8 +613,8 @@
"Print the set s: {1, 2, 4, 5}\n",
"Union of sets: {1, 2, 3, 4}\n",
"Intersection of sets: {2, 3}\n",
"Adding an element {1, 2, 4, 5, 7}\n",
"Removing an element {1, 4, 5, 7}\n"
"Adding an element: {1, 2, 4, 5, 7}\n",
"Removing an element: {1, 4, 5, 7}\n"
]
}
],
Expand All @@ -622,9 +624,9 @@
"print('Union of sets:', {1, 2, 3} | {2, 3, 4})\n",
"print('Intersection of sets:', {1, 2, 3} & {2, 3, 4})\n",
"s.add(7)\n",
"print('Adding an element', s)\n",
"print('Adding an element:', s)\n",
"s.remove(2)\n",
"print('Removing an element', s)"
"print('Removing an element:', s)"
]
},
{
Expand Down Expand Up @@ -682,7 +684,7 @@
"<strong>Note:</strong><br>\n",
"<ul>\n",
"<li>Type conversions from <code>float</code> to <code>int</code> may result in some rounding.</li>\n",
"<li>One cannnot directly convert from the type <code>complex</code> to <code>int</code> or <code>float</code>.</li>\n",
"<li>One cannot directly convert from the type <code>complex</code> to <code>int</code> or <code>float</code>.</li>\n",
"</ul>\n",
"</div>"
]
Expand Down

0 comments on commit b191655

Please sign in to comment.