Skip to content

Commit 974c98f

Browse files
author
Alper Çugun
committed
updated docs
1 parent 3024b20 commit 974c98f

5 files changed

Lines changed: 13 additions & 14 deletions

File tree

‎en/_sources/functions.txt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ You can access variables in functions as well::
2929
turtle.forward(size)
3030
turtle.backward(size)
3131

32-
.. note:: Python uses *whitespace to identify blocks of code* belonging
33-
together. While other languages use special characters (like curly brackets)
32+
.. Very Important Note:: Python uses *whitespace to identify blocks of code* belonging
33+
together. While other languages use special characters (like curly brackets {})
3434
in Python a block is introduced with a colon at the end of the line and
3535
commands within a deeper indentation level - usually 4 spaces. The block ends
3636
with the first line with a lesser indentation level.
37+
38+
If you mix up tabs and spaces the interpreter is going to complain. Make sure to always use one or the other.
3739

3840
A function for a square
3941
=======================

‎en/_sources/simple_drawing.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ can move the turtle around.
1111

1212
Before you can use turtle, you have to import it::
1313

14+
Note that these commands do not display anything yet because the turtle window vanishes, read along to see how to fix that.
15+
1416
import turtle
1517

1618
.. image:: /images/default.png
@@ -85,6 +87,8 @@ If you want to get creative, you can modify your shape with the
8587
out the *signature* of a function (that is the syntax and semantics of it, say,
8688
number of parameters and their meaning) you can use ``help(turtle.color)``.
8789

90+
Press the `q` key to exit the help again.
91+
8892
.. caution::
8993

9094
If you misdrew anything, you can tell turtle to erase its drawing board

‎en/functions.html‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ <h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to t
7575
<span class="n">turtle</span><span class="o">.</span><span class="n">backward</span><span class="p">(</span><span class="n">size</span><span class="p">)</span>
7676
</pre></div>
7777
</div>
78-
<div class="admonition note">
79-
<p class="first admonition-title">Note</p>
80-
<p class="last">Python uses <em>whitespace to identify blocks of code</em> belonging
81-
together. While other languages use special characters (like curly brackets)
82-
in Python a block is introduced with a colon at the end of the line and
83-
commands within a deeper indentation level - usually 4 spaces. The block ends
84-
with the first line with a lesser indentation level.</p>
85-
</div>
8678
</div>
8779
<div class="section" id="a-function-for-a-square">
8880
<h2>A function for a square<a class="headerlink" href="#a-function-for-a-square" title="Permalink to this headline"></a></h2>

‎en/searchindex.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎en/simple_drawing.html‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ <h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to t
5555
<p>It has functions like <tt class="docutils literal"><span class="pre">turtle.forward(...)</span></tt> and <tt class="docutils literal"><span class="pre">turtle.left(...)</span></tt> which
5656
can move the turtle around.</p>
5757
<p>Before you can use turtle, you have to import it:</p>
58-
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">turtle</span>
59-
</pre></div>
60-
</div>
58+
<p>Note that these commands do not display anything yet because the turtle window vanishes, read along to see how to fix that.</p>
59+
<blockquote>
60+
<div>import turtle</div></blockquote>
6161
<img alt="_images/default.png" src="_images/default.png" />
6262
<div class="highlight-python"><div class="highlight"><pre><span class="n">turtle</span><span class="o">.</span><span class="n">forward</span><span class="p">(</span><span class="mi">25</span><span class="p">)</span>
6363
</pre></div>
@@ -115,6 +115,7 @@ <h3>Bonus<a class="headerlink" href="#bonus" title="Permalink to this headline">
115115
<tt class="docutils literal"><span class="pre">turtle.width(...)</span></tt> and <tt class="docutils literal"><span class="pre">turtle.color(...)</span></tt> functions. If you cannot figure
116116
out the <em>signature</em> of a function (that is the syntax and semantics of it, say,
117117
number of parameters and their meaning) you can use <tt class="docutils literal"><span class="pre">help(turtle.color)</span></tt>.</p>
118+
<p>Press the <cite>q</cite> key to exit the help again.</p>
118119
<div class="admonition caution">
119120
<p class="first admonition-title">Caution</p>
120121
<p class="last">If you misdrew anything, you can tell turtle to erase its drawing board

0 commit comments

Comments
 (0)