Skip to content

Commit 371e972

Browse files
committed
Remove unnecessary comments, add a descriptive comment and a short paragraph explaining what comments are for (fixes OpenTechSchool#34)
1 parent c148a41 commit 371e972

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

docs/en/functions.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,26 @@ Solution
7575
turtle.forward(50)
7676
turtle.left(90)
7777

78-
angle = 20 # <--
78+
# Set the angle we want to use for our square
79+
angle = 20
7980
tilted_square()
8081
tilted_square()
8182
tilted_square()
8283

84+
Comments
85+
--------
86+
87+
In the solution above, the line that starts with a ``#`` is called a
88+
comment. In Python, anything that goes on a line after ``#`` is ignored
89+
by the computer. Use comments to explain what your program does,
90+
without changing the behaviour for the computer.
91+
92+
Comments can also go at the end of a line, like this:
93+
94+
::
95+
96+
angle = 20 # Set the angle we want to use for our square
97+
8398

8499
A function for a hexagon
85100
========================

docs/en/simple_drawing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Solution
176176

177177
::
178178

179-
turtle.left(20) # <--
179+
turtle.left(20)
180180

181181
turtle.forward(50)
182182
turtle.left(90)
@@ -187,7 +187,7 @@ Solution
187187
turtle.forward(50)
188188
turtle.left(90)
189189

190-
turtle.left(20) # <--
190+
turtle.left(20)
191191

192192
turtle.forward(50)
193193
turtle.left(90)
@@ -198,7 +198,7 @@ Solution
198198
turtle.forward(50)
199199
turtle.left(90)
200200

201-
turtle.left(20) # <--
201+
turtle.left(20)
202202

203203
turtle.forward(50)
204204
turtle.left(90)

docs/en/variables.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ Solution
6767
turtle.left(90)
6868

6969
turtle.left(angle)
70-
# ...
70+
71+
72+
... and so on
7173

7274
Bonus
7375
-----

0 commit comments

Comments
 (0)