You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 39dd5cd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: source/simple_drawing.rst
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,25 +9,28 @@ Turtle is like a drawing board.
9
9
It has functions like ``turtle.forward(...)`` and ``turtle.left(...)`` which
10
10
can move the turtle around.
11
11
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::
15
15
16
16
import turtle
17
17
18
18
.. image:: /images/default.png
19
19
20
20
.. note::
21
21
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.
24
23
25
24
.. note::
26
25
27
26
Do you work with Ubuntu and get the error message "No module named
28
27
_tkinter"? Install the missing package with ``sudo apt-get install
29
28
python3-tk``
30
29
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
+
31
34
::
32
35
33
36
turtle.forward(25)
@@ -46,6 +49,9 @@ by the given distance. ``turtle.left(...)`` takes a number of degrees which you
46
49
to rotate to the left. (There are ``turtle.backward(...)`` and
47
50
``turtle.right(...)``, too.)
48
51
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
+
49
55
The standard turtle is just a triangle. That's no fun! Let's make it a turtle
0 commit comments