Skip to content

Commit 39dd5cd

Browse files
committed
Merge pull request OpenTechSchool#49 from Pletcher/master
Discourage copy-pasting ( OpenTechSchool#32 ) and minor syntax updates
2 parents 8694dbb + d3b4073 commit 39dd5cd

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
._*
33
*.pyc
44

5+
bin
6+
clear
7+
include
8+
lib
59
_build
610
source/locale/*/*/*.mo
711
source/_locales/*/*/*.mo

‎source/loops.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ You can also loop over elements of your choice::
3333
for i in 5, 7, 11, 13:
3434
print(i)
3535
total = total + i
36+
3637
print(total)
3738

3839
Write this example out and run it with python, to check it works how you might

‎source/simple_drawing.rst‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,28 @@ Turtle is like a drawing board.
99
It has functions like ``turtle.forward(...)`` and ``turtle.left(...)`` which
1010
can move the turtle around.
1111

12-
Before you can use turtle, you have to import it (we'd recommend playing around
13-
with it in the interactive interpreter first, there is an extra bit of work
14-
required to make it work from files)::
12+
Before you can use turtle, you have to import it. We recommend playing around
13+
with it in the interactive interpreter first, as there is an extra bit of work
14+
required to make it work from files. Just go to your terminal and type::
1515

1616
import turtle
1717

1818
.. image:: /images/default.png
1919

2020
.. note::
2121

22-
Not seeing anything on Mac OS? Try looking if a new window opened behind
23-
your command line.
22+
Not seeing anything on Mac OS? Try issuing a command like ``turtle.forward(0)`` and looking if a new window opened behind your command line.
2423

2524
.. note::
2625

2726
Do you work with Ubuntu and get the error message "No module named
2827
_tkinter"? Install the missing package with ``sudo apt-get install
2928
python3-tk``
3029

30+
.. note::
31+
32+
While it might be tempting to just copy and paste what's written on this page into your terminal, we encourage you to type out each command. Typing gets the syntax under your fingers (building that muscle memory!) and can even help avoid strange syntax errors.
33+
3134
::
3235

3336
turtle.forward(25)
@@ -46,6 +49,9 @@ by the given distance. ``turtle.left(...)`` takes a number of degrees which you
4649
to rotate to the left. (There are ``turtle.backward(...)`` and
4750
``turtle.right(...)``, too.)
4851

52+
.. note::
53+
Want to start fresh? You can type ``turtle.reset()`` to clear the drawing that your ``turtle`` has made so far. We'll go into more detail on ``turtle.reset()`` in just a bit.
54+
4955
The standard turtle is just a triangle. That's no fun! Let's make it a turtle
5056
instead with the ``turtle.shape()`` command::
5157

0 commit comments

Comments
 (0)