Skip to content

Commit 230c99e

Browse files
committed
reworded explanation of running code and explaining comments in re learnco students issue #2
1 parent 1f25cf1 commit 230c99e

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,19 @@ For example, let's say we want to capitalize all of the letters of "art vandlay"
2929

3030

3131
```python
32-
"art vandelay" # 'ART VANDELAY'
32+
"art vandelay"
3333
```
3434

3535
Notice that there is no output below the gray code above. This is because Jupyter notebooks do not automatically run our code - so they do not automatically know the output. To display the output, we must **run** the code by clicking on the gray cell and then pressing shift + enter. Let's try it in the cell above and see our output appear below.
3636

37-
Ok, once we see the output take a look at the hash tag to the right of the string. The hash tag to the right is a comment. Comments are used for programmers to annotate their code, but a comment has no impact on the code. See this by running the next cell below (again, press shift + enter).
37+
Ok, once we see the output take a look at the cell below with the hash tag to the right of the string, `'hello'`. This is a comment. Comments are used for programmers to annotate their code, but a comment has no impact on the code. See this by running the cell below (again, press shift + enter).
3838

3939

4040
```python
41-
'hello'
42-
### whattttt
41+
'hello' ### whattttt
4342
```
4443

45-
If we press shift+enter on the cell above to run the code, we will see that Python happily ignores the comment. So here (and in future labs), a comment will be provided to indicate what we should see as the return value of our code. When we press shift+enter, and the output below matches the comment to the right of our code, we did it correctly.
44+
After pressing shift+enter on the cell above, we see that Python happily ignores the comment. So here (and in future labs), a comment will be provided to indicate what we should see as the return value of our code. When we press shift+enter, and the output below matches the comment to the right of our code, we did it correctly.
4645

4746
> In future labs, Learn will check our code to ensure that we did it correctly. But for our first lab, this works fine.
4847

index.ipynb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
},
8787
"outputs": [],
8888
"source": [
89-
"\"art vandelay\" # 'ART VANDELAY'"
89+
"\"art vandelay\""
9090
]
9191
},
9292
{
@@ -100,7 +100,7 @@
100100
"cell_type": "markdown",
101101
"metadata": {},
102102
"source": [
103-
"Ok, once we see the output take a look at the hash tag to the right of the string. The hash tag to the right is a comment. Comments are used for programmers to annotate their code, but a comment has no impact on the code. See this by running the next cell below (again, press shift + enter)."
103+
"Ok, once we see the output take a look at the cell below with the hash tag to the right of the string, `'hello'`. This is a comment. Comments are used for programmers to annotate their code, but a comment has no impact on the code. See this by running the cell below (again, press shift + enter)."
104104
]
105105
},
106106
{
@@ -111,15 +111,14 @@
111111
},
112112
"outputs": [],
113113
"source": [
114-
"'hello'\n",
115-
"### whattttt"
114+
"'hello' ### whattttt"
116115
]
117116
},
118117
{
119118
"cell_type": "markdown",
120119
"metadata": {},
121120
"source": [
122-
"If we press shift+enter on the cell above to run the code, we will see that Python happily ignores the comment. So here (and in future labs), a comment will be provided to indicate what we should see as the return value of our code. When we press shift+enter, and the output below matches the comment to the right of our code, we did it correctly."
121+
"After pressing shift+enter on the cell above, we see that Python happily ignores the comment. So here (and in future labs), a comment will be provided to indicate what we should see as the return value of our code. When we press shift+enter, and the output below matches the comment to the right of our code, we did it correctly."
123122
]
124123
},
125124
{

0 commit comments

Comments
 (0)