Skip to content

Commit 0ae0cba

Browse files
committed
resolved issues learn-co-students#1, learn-co-students#2, #5, #6, #7, #8, add license/contrib
1 parent b943429 commit 0ae0cba

File tree

4 files changed

+107
-22
lines changed

4 files changed

+107
-22
lines changed

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing to Learn.co Curriculum
2+
3+
We're really exited that you're about to contribute to the [open curriculum](https://learn.co/content-license) on [Learn.co](https://learn.co). If this is your first time contributing, please continue reading to learn how to make the most meaningful and useful impact possible.
4+
5+
## Raising an Issue to Encourage a Contribution
6+
7+
If you notice a problem with the curriculum that you believe needs improvement
8+
but you're unable to make the change yourself, you should raise a Github issue
9+
containing a clear description of the problem. Include relevant snippets of
10+
the content and/or screenshots if applicable. Curriculum owners regularly review
11+
issue lists and your issue will be prioritized and addressed as appropriate.
12+
13+
## Submitting a Pull Request to Suggest an Improvement
14+
15+
If you see an opportunity for improvement and can make the change yourself go
16+
ahead and use a typical git workflow to make it happen:
17+
18+
* Fork this curriculum repository
19+
* Make the change on your fork, with descriptive commits in the standard format
20+
* Open a Pull Request against this repo
21+
22+
A curriculum owner will review your change and approve or comment on it in due
23+
course.
24+
25+
# Why Contribute?
26+
27+
Curriculum on Learn is publicly and freely available under Learn's
28+
[Educational Content License](https://learn.co/content-license). By
29+
embracing an open-source contribution model, our goal is for the curriculum
30+
on Learn to become, in time, the best educational content the world has
31+
ever seen.
32+
33+
We need help from the community of Learners to maintain and improve the
34+
educational content. Everything from fixing typos, to correcting
35+
out-dated information, to improving exposition, to adding better examples,
36+
to fixing tests—all contributions to making the curriculum more effective are
37+
welcome.

LICENSE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Learn.co Educational Content License
2+
3+
Copyright (c) 2018 Flatiron School, Inc
4+
5+
The Flatiron School, Inc. owns this Educational Content. However, the Flatiron
6+
School supports the development and availability of educational materials in
7+
the public domain. Therefore, the Flatiron School grants Users of the Flatiron
8+
Educational Content set forth in this repository certain rights to reuse, build
9+
upon and share such Educational Content subject to the terms of the Educational
10+
Content License set forth [here](http://learn.co/content-license)
11+
(http://learn.co/content-license). You must read carefully the terms and
12+
conditions contained in the Educational Content License as such terms govern
13+
access to and use of the Educational Content.
14+
15+
Flatiron School is willing to allow you access to and use of the Educational
16+
Content only on the condition that you accept all of the terms and conditions
17+
contained in the Educational Content License set forth
18+
[here](http://learn.co/content-license) (http://learn.co/content-license). By
19+
accessing and/or using the Educational Content, you are agreeing to all of the
20+
terms and conditions contained in the Educational Content License. If you do
21+
not agree to any or all of the terms of the Educational Content License, you
22+
are prohibited from accessing, reviewing or using in any way the Educational
23+
Content.

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
### Introduction
55

6-
So far, many of the readings and all of the labs you have been working with have been interactive. You are working in an environment that allows us to both display text, and run Python code. In this lesson, we explore Jupyter, the software powering these interactive documents.
6+
So far, many of the readings and all of the labs you have been working with have been interactive. You are working in an environment that allows us to both display text and run Python code. In this lesson, we explore Jupyter, the software powering these interactive documents.
77

88
### Jupyter Background
99

@@ -27,15 +27,19 @@ If we wish to quickly add a new cell we can do so with the following steps:
2727

2828
* Make sure we are not in insert mode, but in escape mode
2929
* *Remember we can tell we are in insert mode when we have a green border around our cell.*
30-
* To get out of insert mode and into escape mode, press the escape key.
30+
* To get out of insert mode and into escape mode, press shift + enter. Another option is to press the escape key.
3131
* You will no longer see a cell bordered in green.
32-
* Then press the letter `b`
32+
* Then press the letter `b` to create a new cell.
3333

3434
#### Deleting cells
3535

3636
To delete a cell we once again should be in escape mode, and then press the `x` key.
3737

38-
Of course, we'll want a way to undo our deletion. You can press d to undo deletion of a cell. Note that this is different from `cmd + z`. Pressing `cmd + z` undoes our changes inside of a cell, but pressing `d` from escape mode is to undo changing a cell in it's entirety.
38+
Of course, we'll want a way to undo our deletion. From escape mode, you can press `z` to undo deletion of a cell. Note that this is different from `cmd + z`. Pressing `cmd + z` while in insert mode undoes any changes inside of a cell while, whether these changes be deletions or text insertions. Pressing `z` from escape mode undoes the deletion a cell.
39+
40+
Go to escape mode and press `x`. This cell disappears!
41+
42+
Then bring it back with `z`.
3943

4044
### Types of Cells
4145

@@ -45,25 +49,31 @@ Cells can also have a type of code. If we are writing in a cell that is for Pyt
4549

4650

4751
```python
48-
This is a python cell without valid Python so we wil see an error
52+
This is a python cell without valid Python so we will see an error
4953
```
5054

5155
So, a cell must either be of type markdown or of type code, in which case all of the contents must be valid Python. It cannot be both. We can quickly change a cell from markdown to code with some keyboard shortcuts.
5256

53-
From escape mode, we change a cell to type code by pressing the letter `y`. Add a new cell by pressing the letter `b`, then type `j` to change that cell into type code. Again, press `shift + enter` to save the changes of the cell. From escape mode, press the letter `m` to change the cell from code to markdown.
57+
From escape mode, we change a cell to type code by pressing the letter `y`.
58+
59+
Anytime we create a new cell, say with the shortcut key `b`, the new cell will default to code mode. We can switch to escape mode and press the letter `m` to change the cell from code to markdown.
60+
61+
#### View All Shortcuts
62+
63+
Press the key `h` while in escape mode to view the menu for all of Jupyter's shortcuts.
5464

5565
### Working with Python in Jupyter
5666

5767
Ok, now that we know a little bit about adding and deleting cells, as well as changing cell types from markdown to code, let's focus on working with Python in Jupyter. We'll go into a large amount of detail about working with a Jupyter notebook in Python, but the main takeaway is this: if we see a Python cell, we should press `shift + enter` on that cell.
5868

59-
The major gotcha in working with Python code is that Python will only execute the cells that are run. So for example, just seeing the cell where we define `name` to `'bob'` below does not write that cell to memory.
69+
The major gotcha in working with Python code is that we must execute the cells in order for Python to register the code in them. So for example, just seeing the cell where we define `name` to `'bob'` below does not write that cell to memory.
6070

6171

6272
```python
6373
name = 'bob'
6474
```
6575

66-
If we try to reference that variable later on withouth having run it, Python will tell us that it is not defined.
76+
If we try to reference that variable later on without having executed the cell, Python will tell us that it is not defined.
6777

6878

6979
```python
@@ -75,7 +85,7 @@ name
7585

7686
NameError Traceback (most recent call last)
7787

78-
<ipython-input-1-18697449d7c4> in <module>()
88+
<ipython-input-4-9bc0cb2ed6de> in <module>()
7989
----> 1 name
8090

8191

@@ -99,7 +109,7 @@ age
99109

100110
As you can see the variable `age` is set to 14, so when the cell is run `14` is displayed underneath.
101111

102-
One tricky thing to note is that assignment, the action of assigning a varible, **does not** have a return a value. So, even though the cell is run, if the last line of cell is the assigning of a variable, nothing is displayed underneath.
112+
One tricky thing to note is that assignment, the action of assigning a variable, **does not** have a return a value. So, even though the cell is run, if the last line of cell is the assigning of a variable, nothing is displayed underneath.
103113

104114

105115
```python
@@ -135,6 +145,6 @@ The same thing goes for working through a Readme. The Readmes will often assign
135145

136146
### Summary
137147

138-
In this lesson, we learned about Jupyter notebooks. We saw that in Jupyter notebooks, we can either be in insert mode or escape mode. While in insert mode, we can edit the cells and undo changes within that cell with `command + z` or `ctl + z`. In escape mode, we can add cells with `b`, delete a cell with `x`, and undo deletion of a cell with `d`. We can also change the type of a cell to markdown with `m` and to Python code with `j`.
148+
In this lesson, we learned about Jupyter notebooks. We saw that in Jupyter notebooks, we can either be in insert mode or escape mode. While in insert mode, we can edit the cells and undo changes within that cell with `cmd + z` on a mac or `ctl + z` on windows. In escape mode, we can add cells with `b`, delete a cell with `x`, and undo deletion of a cell with `z`. We can also change the type of a cell to markdown with `m` and to Python code with `y`.
139149

140150
Then we saw how to work with Python code in Jupyter notebooks. We saw that to have our code in a cell executed, we need to press `shift + enter`. If we do not do this, then our variables that we assigned in Python are not going to be recognized by Python later on in our Jupyter notebook.

index.ipynb

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"cell_type": "markdown",
1919
"metadata": {},
2020
"source": [
21-
"So far, many of the readings and all of the labs you have been working with have been interactive. You are working in an environment that allows us to both display text, and run Python code. In this lesson, we explore Jupyter, the software powering these interactive documents."
21+
"So far, many of the readings and all of the labs you have been working with have been interactive. You are working in an environment that allows us to both display text and run Python code. In this lesson, we explore Jupyter, the software powering these interactive documents."
2222
]
2323
},
2424
{
@@ -100,7 +100,11 @@
100100
"source": [
101101
"To delete a cell we once again should be in escape mode, and then press the `x` key.\n",
102102
"\n",
103-
"Of course, we'll want a way to undo our deletion. From escape mode, you can press z to undo deletion of a cell. Note that this is different from `cmd + z`. Pressing `cmd + z` undoes our changes inside of a cell, but pressing `d` from escape mode is to undo changing a cell in it's entirety."
103+
"Of course, we'll want a way to undo our deletion. From escape mode, you can press `z` to undo deletion of a cell. Note that this is different from `cmd + z`. Pressing `cmd + z` while in insert mode undoes any changes inside of a cell while, whether these changes be deletions or text insertions. Pressing `z` from escape mode undoes the deletion a cell.\n",
104+
"\n",
105+
"Go to escape mode and press `x`. This cell disappears!\n",
106+
"\n",
107+
"Then bring it back with `z`."
104108
]
105109
},
106110
{
@@ -122,7 +126,7 @@
122126
},
123127
"outputs": [],
124128
"source": [
125-
"This is a python cell without valid Python so we wil see an error"
129+
"This is a python cell without valid Python so we will see an error"
126130
]
127131
},
128132
{
@@ -133,7 +137,18 @@
133137
"source": [
134138
"So, a cell must either be of type markdown or of type code, in which case all of the contents must be valid Python. It cannot be both. We can quickly change a cell from markdown to code with some keyboard shortcuts.\n",
135139
"\n",
136-
"From escape mode, we change a cell to type code by pressing the letter `y`. Add a new cell by pressing the letter `b`, then type `j` to change that cell into type code. Again, press `shift + enter` to save the changes of the cell. From escape mode, press the letter `m` to change the cell from code to markdown."
140+
"From escape mode, we change a cell to type code by pressing the letter `y`.\n",
141+
"\n",
142+
"Anytime we create a new cell, say with the shortcut key `b`, the new cell will default to code mode. We can switch to escape mode and press the letter `m` to change the cell from code to markdown."
143+
]
144+
},
145+
{
146+
"cell_type": "markdown",
147+
"metadata": {},
148+
"source": [
149+
"#### View All Shortcuts\n",
150+
"\n",
151+
"Press the key `h` while in escape mode to view the menu for all of Jupyter's shortcuts."
137152
]
138153
},
139154
{
@@ -154,7 +169,7 @@
154169
"cell_type": "markdown",
155170
"metadata": {},
156171
"source": [
157-
"The major gotcha in working with Python code is that Python will only execute the cells that are run. So for example, just seeing the cell where we define `name` to `'bob'` below does not write that cell to memory."
172+
"The major gotcha in working with Python code is that we must execute the cells in order for Python to register the code in them. So for example, just seeing the cell where we define `name` to `'bob'` below does not write that cell to memory."
158173
]
159174
},
160175
{
@@ -172,12 +187,12 @@
172187
"cell_type": "markdown",
173188
"metadata": {},
174189
"source": [
175-
"If we try to reference that variable later on withouth having run it, Python will tell us that it is not defined. "
190+
"If we try to reference that variable later on without having executed the cell, Python will tell us that it is not defined. "
176191
]
177192
},
178193
{
179194
"cell_type": "code",
180-
"execution_count": 1,
195+
"execution_count": 4,
181196
"metadata": {},
182197
"outputs": [
183198
{
@@ -187,7 +202,7 @@
187202
"traceback": [
188203
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
189204
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
190-
"\u001b[0;32m<ipython-input-1-18697449d7c4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mname\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
205+
"\u001b[0;32m<ipython-input-4-9bc0cb2ed6de>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mname\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
191206
"\u001b[0;31mNameError\u001b[0m: name 'name' is not defined"
192207
]
193208
}
@@ -230,7 +245,7 @@
230245
"source": [
231246
"As you can see the variable `age` is set to 14, so when the cell is run `14` is displayed underneath.\n",
232247
"\n",
233-
"One tricky thing to note is that assignment, the action of assigning a varible, **does not** have a return a value. So, even though the cell is run, if the last line of cell is the assigning of a variable, nothing is displayed underneath. "
248+
"One tricky thing to note is that assignment, the action of assigning a variable, **does not** have a return a value. So, even though the cell is run, if the last line of cell is the assigning of a variable, nothing is displayed underneath. "
234249
]
235250
},
236251
{
@@ -316,7 +331,7 @@
316331
"cell_type": "markdown",
317332
"metadata": {},
318333
"source": [
319-
"In this lesson, we learned about Jupyter notebooks. We saw that in Jupyter notebooks, we can either be in insert mode or escape mode. While in insert mode, we can edit the cells and undo changes within that cell with `command + z` or `ctl + z`. In escape mode, we can add cells with `b`, delete a cell with `x`, and undo deletion of a cell with `d`. We can also change the type of a cell to markdown with `m` and to Python code with `j`. \n",
334+
"In this lesson, we learned about Jupyter notebooks. We saw that in Jupyter notebooks, we can either be in insert mode or escape mode. While in insert mode, we can edit the cells and undo changes within that cell with `cmd + z` on a mac or `ctl + z` on windows. In escape mode, we can add cells with `b`, delete a cell with `x`, and undo deletion of a cell with `z`. We can also change the type of a cell to markdown with `m` and to Python code with `y`. \n",
320335
"\n",
321336
"Then we saw how to work with Python code in Jupyter notebooks. We saw that to have our code in a cell executed, we need to press `shift + enter`. If we do not do this, then our variables that we assigned in Python are not going to be recognized by Python later on in our Jupyter notebook."
322337
]
@@ -338,7 +353,7 @@
338353
"name": "python",
339354
"nbconvert_exporter": "python",
340355
"pygments_lexer": "ipython3",
341-
"version": "3.6.1"
356+
"version": "3.6.4"
342357
}
343358
},
344359
"nbformat": 4,

0 commit comments

Comments
 (0)