Skip to content

Commit 62c66bb

Browse files
committed
rewrite intro/recap part 1
1 parent d51a7fc commit 62c66bb

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ map:
99
- title: Core
1010
caption: The 'mandatory' workshop content
1111
subpages:
12-
- title: Recap of Python essentials
12+
- title: Python and Jupyter-Notebook (Recap)
1313
path: /core/recap.html
1414
caption: A quick recap of some of the Introduction to Programming essentials
1515
- title: Data Structures in Python

core/recap.md

+42-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
11
---
22

33
layout: ots
4-
title: Recap of Python Essentials
4+
title: Python and Jupyter-Notebook (Recap)
55

66
---
77

8-
This chapter is just a recap of some of the important points of the Introduction to Programming with Python course. Feel free to skip ahead if this course is still fresh in your memory.
8+
This chapter is a recap of some of the important points of the Introduction to Programming with Python course. Feel free to skip ahead if this course is still fresh in your memory. In addition, we will introduce jupyter-notebooks, an interactive way to execute python scripts.
99

10-
# Running Python
10+
# Installing Python and Jupyter
11+
12+
The easiest way to install python on your computer is to use *anaconda*. There are many other ways to get python and jupyter but this one is most suitable for beginners. Follow the instructions for your operating system on [https://www.anaconda.com/download/].
13+
14+
With the anaconda package, you get the anaconda navigator, an interactive program that lets you install addons and run programs.
15+
16+
Use the anaconda navigator to install jupyter notebook. Alternatively, you can use the command line and type
17+
```
18+
conda install jupyter notebook
19+
```
20+
21+
22+
23+
# Running Python and Jupyter
1124

1225
After installing Python on your system successfully, you can start the
1326
interactive Python prompt by typing `python` in the command line and
1427
pressing `<Enter>`. It will show you some context information about
1528
Python similar to this::
1629

17-
Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32
30+
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
31+
[GCC 7.3.0] on linux
1832
Type "help", "copyright", "credits" or "license" for more information.
19-
>>>
33+
>>>
2034

2135
On Windows you can open Python through the Start Menu.
2236

@@ -28,13 +42,34 @@ To run a program saved in a Python file, you can run it from the command line li
2842

2943
On Windows you can run a Python file by double-clicking it.
3044

45+
But there is a much more interactive and fast way to start using python. Launch jupyter notebook from the anaconda navigator or by typing on the command line
46+
47+
```
48+
jupyter notebook
49+
```
50+
51+
It will start the python interpreter in the background and show a browser page, that is connected to python and will interactively edit and run your python code.
52+
53+
Navigate to a directory where you want to start you python project and press the *new* button on the top right of the web page.
54+
55+
56+
3157

3258
# Loops
3359

3460
What does this code do?
3561

36-
for i in 2, 4, 6, 8:
37-
print(i)
62+
<div class="jupyter">
63+
```python
64+
for i in 2, 4, 6, 8:
65+
print(i)
66+
```
67+
68+
2
69+
4
70+
6
71+
8
72+
</div>
3873

3974
### Solution
4075

0 commit comments

Comments
 (0)