Streamline previous content
This commit is contained in:
parent
f6068383ba
commit
22a85bc2ba
4 changed files with 350 additions and 306 deletions
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"This course is set up to be a *thorough* introduction to programming in [Python](https://www.python.org/).\n",
|
||||
"This book is set up to be a *thorough* introduction to programming in [Python](https://www.python.org/).\n",
|
||||
"\n",
|
||||
"It teaches the concepts behind and the syntax of the core Python language as defined by the [Python Software Foundation](https://www.python.org/psf/) in the official [language reference](https://docs.python.org/3/reference/index.html) and introduces additions to the language as distributed with the [standard library](https://docs.python.org/3/library/index.html) that come with every installation.\n",
|
||||
"\n",
|
||||
|
@ -58,10 +58,10 @@
|
|||
"source": [
|
||||
"To be suitable for *total beginners*, there are *no* formal prerequisites. It is only expected that the student has:\n",
|
||||
"\n",
|
||||
"- a *solid* understanding of the **English language** (i.e., usage of *technical* terms with *narrow* and *distinct* meanings),\n",
|
||||
"- knowledge of **basic mathematics** from high school (i.e., addition, subtraction, multiplication, division, and a little bit of calculus and statistics),\n",
|
||||
"- the ability to **think conceptually** and **reason logically** (i.e., *not* just memorizing), and\n",
|
||||
"- the willingness to **invest 2-4 hours a day for a month** (cf., \"ABC\"-rule at the end)"
|
||||
"- a *solid* understanding of the **English language**,\n",
|
||||
"- knowledge of **basic mathematics** from high school,\n",
|
||||
"- the ability to **think conceptually** and **reason logically**, and\n",
|
||||
"- the willingness to **invest 2-4 hours a day for a month**."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -83,7 +83,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"The course's **main goal** is to **prepare** the student **for further studies** in the \"field\" of **data science**."
|
||||
"The **main goal** of this introduction is to **prepare** the student **for further studies** in the \"field\" of **data science**."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -94,7 +94,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"This includes but is not limited to more advanced courses on topics such as:\n",
|
||||
"This includes but is not limited to topics such as:\n",
|
||||
"- linear algebra\n",
|
||||
"- statistics & econometrics\n",
|
||||
"- data cleaning & wrangling\n",
|
||||
|
@ -154,7 +154,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"To follow this course, a working installation of **Python 3.6** or higher is needed.\n",
|
||||
"To follow this book, a working installation of **Python 3.6** or higher is needed.\n",
|
||||
"\n",
|
||||
"A popular and beginner friendly way is to install the [Anaconda Distribution](https://www.anaconda.com/distribution/) that not only ships Python and the standard library but comes pre-packaged with a lot of third-party libraries from the so-called \"scientific stack\". Just go to the [download](https://www.anaconda.com/download/) page and install the latest version (i.e., *2019-07* with Python 3.7 at the time of this writing) for your operating system.\n",
|
||||
"\n",
|
||||
|
@ -180,7 +180,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"To download the course's materials as a ZIP file, open the accompanying [GitHub repository](https://github.com/webartifex/intro-to-python) in a web browser and click on the green \"Clone or download\" button on the right. Then, unpack the ZIP file into a folder of your choosing (ideally somewhere within your personal user folder so that the files show up right away)."
|
||||
"To download the materials accompanying this book as a ZIP file, open this [GitHub repository](https://github.com/webartifex/intro-to-python) in a web browser and click on the green \"Clone or download\" button on the right. Then, unpack the ZIP file into a folder of your choosing (ideally somewhere within your personal user folder so that the files show up right away)."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -252,7 +252,7 @@
|
|||
"\n",
|
||||
"Furthermore, Jupyter notebooks have become a de-facto standard for communicating and exchanging results in the data science community (both in academia and business) and often provide a more intuitive alternative to terminal based ways of running Python (e.g., the default [Python interpreter](https://docs.python.org/3/tutorial/interpreter.html) as shown above or a more advanced interactive version like [IPython](https://ipython.org/)) or even a full-fledged [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (e.g., the commercial [PyCharm](https://www.jetbrains.com/pycharm/) or the free [Spyder](https://github.com/spyder-ide/spyder)).\n",
|
||||
"\n",
|
||||
"In particular, they allow to mix plain English text with Python code cells. The plain text can be formatted using the [Markdown](https://guides.github.com/features/mastering-markdown/) language and mathematical expressions can be typeset with [LaTeX](https://www.overleaf.com/learn/latex/Free_online_introduction_to_LaTeX_%28part_1%29). Lastly, we can include pictures, plots, and even videos. Because of these features, the notebooks developed for this course come in a self-contained \"tutorial\" style that enables students to learn and review the material on their own."
|
||||
"In particular, they allow to mix plain English text with Python code cells. The plain text can be formatted using the [Markdown](https://guides.github.com/features/mastering-markdown/) language and mathematical expressions can be typeset with [LaTeX](https://www.overleaf.com/learn/latex/Free_online_introduction_to_LaTeX_%28part_1%29). Lastly, we can include pictures, plots, and even videos. Because of these features, the notebooks developed for this book come in a self-contained \"tutorial\" style that enables students to learn and review the material on their own."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -295,7 +295,15 @@
|
|||
"slide_type": "slide"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Hello world\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(\"Hello world\")"
|
||||
]
|
||||
|
@ -351,7 +359,8 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"For this course *programming* is \"defined\" as\n",
|
||||
"In this book *programming* is \"defined\" as:\n",
|
||||
"\n",
|
||||
"- a **structured** way of **problem solving**\n",
|
||||
"- by **expressing** the steps of a **computation / process**\n",
|
||||
"- and thereby **documenting** the process in a formal way\n",
|
||||
|
@ -369,7 +378,8 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"That is different from *computer science*, which is\n",
|
||||
"That is different from *computer science*, which is:\n",
|
||||
"\n",
|
||||
"- a field of study comparable to (applied) **mathematics** that\n",
|
||||
"- asks **abstract** questions (\"Is something computable at all?\"),\n",
|
||||
"- develops and analyses **algorithms** and **data structures**,\n",
|
||||
|
@ -419,6 +429,8 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"Here is a brief history of and some background on Python:\n",
|
||||
"\n",
|
||||
"- [Guido van Rossum](https://en.wikipedia.org/wiki/Guido_van_Rossum) (Python’s **[Benevolent Dictator for Life](https://en.wikipedia.org/wiki/Benevolent_dictator_for_life)**) was bored during a week around Christmas 1989 and started Python as a hobby project \"that would keep \\[him\\] occupied\" for some days\n",
|
||||
"- the idea was to create a **general-purpose scripting** language that would allow fast **prototyping** and would **run on every operating system**\n",
|
||||
"- Python grew through the 90s as van Rossum promoted it via his \"Computer Programming for Everybody\" initiative that had the **goal to encourage a basic level of coding literacy** as an equal knowledge alongside English literacy and math skills\n",
|
||||
|
@ -427,17 +439,6 @@
|
|||
"- the language is named after the sketch comedy group [Monty Python](https://en.wikipedia.org/wiki/Monty_Python)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"slideshow": {
|
||||
"slide_type": "skip"
|
||||
}
|
||||
},
|
||||
"source": [
|
||||
"#### Summary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Read chapter 0 of the book. Then work through the ten review questions."
|
||||
"Read Chapter 0 of the book. Then work through the ten review questions."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Read chapter 1 of the book. Then work through the ten review questions."
|
||||
"Read Chapter 1 of the book. Then work through the ten review questions."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -180,7 +180,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Q10**: [PEP 8](https://www.python.org/dev/peps/pep-0008/) suggests that developers use **$8$ spaces** per level of indentation."
|
||||
"**Q10**: [PEP 8](https://www.python.org/dev/peps/pep-0008/) suggests that developers use **8 spaces** per level of indentation."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -263,7 +263,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Q11.3**: Lastly, what does the `end=\"\\n\"` mean in the documentation? Use it in the `for`-loop to print the numbers $1$ through $10$ in just one line."
|
||||
"**Q11.3**: Lastly, what does the `end=\"\\n\"` mean in the documentation? Use it in the `for`-loop to print the numbers 1 through 10 in just one line."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -298,7 +298,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Q11.1**: First, create a list `numbers` with the numbers from $1$ through $100$. You could type all numbers manually but there is of course a smarter way. The built-in [range()](https://docs.python.org/3/library/functions.html#func-range) may be useful here. Read how it works in the documentation. To make the output of [range()](https://docs.python.org/3/library/functions.html#func-range) a `list` object, you have to \"wrap\" it with the [list()](https://docs.python.org/3/library/functions.html#func-list) built-in (i.e., `list(range(...))`)."
|
||||
"**Q11.1**: First, create a list `numbers` with the numbers from 1 through 100. You could type all numbers manually but there is of course a smarter way. The built-in [range()](https://docs.python.org/3/library/functions.html#func-range) may be useful here. Read how it works in the documentation. To make the output of [range()](https://docs.python.org/3/library/functions.html#func-range) a `list` object, you have to \"wrap\" it with the [list()](https://docs.python.org/3/library/functions.html#func-list) built-in (i.e., `list(range(...))`)."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -335,7 +335,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Q11.3**: Create a loop that prints out either the number or any of the Fizz Buzz substitutes. Do it in such a way that we do not end up with $100$ lines of output here."
|
||||
"**Q11.3**: Create a loop that prints out either the number or any of the Fizz Buzz substitutes. Do it in such a way that we do not end up with 100 lines of output here."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue