Skip to content

Commit 23927eb

Browse files
committed
Update spanish
1 parent 9c674ef commit 23927eb

File tree

89 files changed

+21254
-1446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+21254
-1446
lines changed

es_CL/.buildinfo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: dc40191af95d1da16c8a632367b9e208
4-
tags: fbb0d17656682115ca4d033fb2f83ba1
3+
config: 2b47b6f720ecf59314e0c9afe4b8a637
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

es_CL/_sources/conditional_loops.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ functions, perhaps a ``while`` loop and a bit of conditional logic.
6262
It's a bit of a stretch but keep at it! Don't be afraid to talk it out
6363
with a coach or another student.
6464

65+
.. rst-class:: solution
66+
6567
Solution
6668
--------
6769

@@ -100,6 +102,8 @@ respectively.
100102
To draw a spiral, the turtle has to rotate by a constant value and move
101103
forward by an increasing value.
102104

105+
.. rst-class:: solution
106+
103107
Solution
104108
--------
105109

es_CL/_sources/functions.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Write a function that draws a square. Could you use this function to improve the
8282
tilted squares program? If you change the program to use a function, is it easier
8383
to experiment with?
8484

85+
.. rst-class:: solution
86+
8587
Solution
8688
--------
8789

@@ -133,6 +135,9 @@ Give it a good go!
133135
position and angle it was before it was asked to draw the hexagon. This
134136
makes it easier to reason about.
135137

138+
139+
.. rst-class:: solution
140+
136141
Solution
137142
--------
138143

es_CL/_sources/functions_parameters.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Exercise
5555
Write a function that allows you to draw hexagons of any size you want, each
5656
time you call the function.
5757

58+
.. rst-class:: solution
59+
5860
Solution
5961
--------
6062

@@ -80,7 +82,9 @@ Here's an example of drawing shapes with this function:
8082

8183
.. tip::
8284

83-
The sum of the internal angles of any shape is always 360 degrees!
85+
The sum of the external angles of any shape is always 360 degrees!
86+
87+
.. rst-class:: solution
8488

8589
Solution
8690
--------

es_CL/_sources/getting_started.txt

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ learn is how to use and interact with it. There are in fact many ways to do this
7676
the first one to learn is to interact with python's interpreter,
7777
using your **operating system's** (OS) console.
7878

79-
A **console** (or 'terminal', or 'command prompt') is a *textual* way to interact with
80-
your OS, just as the 'desktop', in conjuction with your mouse, is the *graphical*
81-
way to interact your system.
79+
A **console** (or 'terminal', or 'command prompt') is a *textual* way to
80+
interact with your OS, just as the 'desktop', in conjuction with your mouse,
81+
is the *graphical* way to interact your system.
8282

8383
Opening a console on Mac OS X
8484
-----------------------------
@@ -107,11 +107,12 @@ likely want to open :program:`Gnome Terminal`. It should present a prompt like t
107107
Opening a console on Windows
108108
----------------------------
109109

110-
Window's console is called the Command Prompt, named :program:`cmd`.
111-
An easy way to get to it is by using the key combination "Windows+R"
112-
('Windows' meaning the windows logo button), which should open a 'Run' dialog.
113-
Then type :kbd:`cmd` and hit :kbd:`<Enter>` or click Ok. You can also search
114-
for it from the start menu. It should look like::
110+
Window's console is called the Command Prompt, named :program:`cmd`. An easy
111+
way to get to it is by using the key combination :kbd:`Windows+R`
112+
(:kbd:`Windows` meaning the windows logo button), which should open a
113+
:guilabel:`Run` dialog. Then type :program:`cmd` and hit :kbd:`Enter` or
114+
click :guilabel:`Ok`. You can also search for it from the start menu. It should
115+
look like::
115116

116117
C:\Users\myusername>
117118

@@ -127,7 +128,7 @@ The python program that you have installed will by default act as something
127128
called an **interpreter**. An interpreter takes commands and runs them as you
128129
enter them - very handy for trying things out.
129130

130-
Just type :program:`python` at your console, hit :kbd:`<Enter>`, and you should
131+
Just type :program:`python` at your console, hit :kbd:`Enter`, and you should
131132
enter Python's Interpreter.
132133

133134
To find out which version of python you're running,
@@ -153,9 +154,9 @@ You can now enter some python code. Try::
153154

154155
print("Hello world")
155156

156-
Press :kbd:`<Enter>` and see what happens. After showing the results, Python
157+
Press :kbd:`Enter` and see what happens. After showing the results, Python
157158
will bring you back to the interactive prompt, where you could enter
158-
another command::
159+
another command:
159160

160161
>>> print("Hello world")
161162
Hello world
@@ -164,6 +165,7 @@ another command::
164165

165166
An extremely useful command is ``help()``, which enters a help functionality
166167
to explore all the stuff python lets you do, right from the interpreter.
168+
Press :kbd:`q` to close the help window and return to the Python prompt.
167169

168170
To leave the interactive shell, press :kbd:`Ctrl-Z` and then
169171
:kbd:`Enter` on Windows, or :kbd:`Ctrl-D` on OS X or Linux. Alternatively,
@@ -179,10 +181,10 @@ Instead you can save your code to a file and pass a file name to the
179181
:program:`python` executable. It will execute that file instead of launching
180182
the interactive interpreter.
181183

182-
**Let's try that**. Create a file :file:`hello.py` in your current directory
183-
with your favorite text editor and write the print command from above. Now
184-
save that file. On Linux or OS X, you can also run :kbd:`touch hello.py` to
185-
create an empty file to edit. To run this file with python, it's pretty easy:
184+
**Let's try that**. Create a file :file:`hello.py` in your current directory
185+
with your favorite text editor and write the print command from above. Now
186+
save that file. On Linux or OS X, you can also run ``touch hello.py`` to create
187+
an empty file to edit. To run this file with python, it's pretty easy:
186188

187189
.. code-block:: bash
188190

@@ -195,7 +197,7 @@ create an empty file to edit. To run this file with python, it's pretty easy:
195197

196198
On Windows you should also be able to double-click the Python file to run it.
197199

198-
When pressing :kbd:`<Enter>` now, the file is executed and you see the output
200+
When pressing :kbd:`Enter` now, the file is executed and you see the output
199201
as before. But this time, after Python finished executing all commands from
200202
that file it exits back to the system command prompt, instead of going back
201203
to the interactive shell.

es_CL/_sources/index.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Introduction to Programming with Python
22
***************************************
33

4+
.. only:: not latex
45

5-
Table of contents:
6+
Table of contents:
67

78
.. toctree::
89
:maxdepth: 2

es_CL/_sources/logical_operators.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ toggle between drawing while moving, or just moving without a trace.
3232

3333
Can we write a function that only goes forward if the pen is up?
3434

35+
.. rst-class:: solution
36+
3537
Solution
3638
--------
3739

@@ -67,6 +69,8 @@ Earlier we put the turtle in a circular prison. This time let's make
6769
it a box. If the turtle goes more than 100 in the X *or* Y axis then
6870
we turn the turtle back around to the center.
6971

72+
.. rst-class:: solution
73+
7074
Solution
7175
--------
7276

es_CL/_sources/loops.txt

Lines changed: 5 additions & 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
@@ -77,6 +78,8 @@ use ``turtle.pendown()``.
7778

7879
.. image:: /images/dashed.png
7980

81+
.. rst-class:: solution
82+
8083
Solution
8184
--------
8285

@@ -129,6 +132,8 @@ The squares we were drawing at the start of this tutorial had a lot of
129132
repeated lines of code. Can you write out a square drawing program in fewer
130133
lines by utilizing loops?
131134

135+
.. rst-class:: solution
136+
132137
Solution
133138
--------
134139

es_CL/_sources/simple_drawing.txt

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,33 @@ 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
23+
``turtle.forward(0)`` and looking if a new window opened behind your
24+
command line.
2425

2526
.. note::
2627

2728
Do you work with Ubuntu and get the error message "No module named
2829
_tkinter"? Install the missing package with ``sudo apt-get install
2930
python3-tk``
3031

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

3341
turtle.forward(25)
@@ -42,9 +50,14 @@ required to make it work from files)::
4250

4351

4452
The ``turtle.forward(...)`` function tells the turtle to move forward
45-
by the given distance. ``turtle.left(...)`` takes a number of degrees which you want
46-
to rotate to the left. (There are ``turtle.backward(...)`` and
47-
``turtle.right(...)``, too.)
53+
by the given distance. ``turtle.left(...)`` takes a number of degrees which you
54+
want to rotate to the left. There is also ``turtle.backward(...)`` and
55+
``turtle.right(...)``, too.
56+
57+
.. note::
58+
Want to start fresh? You can type ``turtle.reset()`` to clear the drawing
59+
that your ``turtle`` has made so far. We'll go into more detail on
60+
``turtle.reset()`` in just a bit.
4861

4962
The standard turtle is just a triangle. That's no fun! Let's make it a turtle
5063
instead with the ``turtle.shape()`` command::
@@ -70,10 +83,10 @@ until you click on it::
7083

7184
.. note::
7285

73-
Python is a programming language where horizontal indenting of text is
74-
important. We'll learn all about this in the Functions chapter later on,
75-
but for now just keep in mind that stray spaces or tabs before any line
76-
of Python code will cause an unexpected error.
86+
Python is a programming language where horizontal indenting of text is
87+
important. We'll learn all about this in the Functions chapter later on,
88+
but for now just keep in mind that stray spaces or tabs before any line
89+
of Python code can cause an unexpected error.
7790

7891
Drawing a square
7992
================
@@ -97,6 +110,8 @@ Draw a square as in the following picture:
97110

98111
For a square you will probably need a right angle, which is 90 degrees.
99112

113+
.. rst-class:: solution
114+
100115
Solution
101116
--------
102117

@@ -136,7 +151,9 @@ key to exit the pager.
136151

137152
NameError: name 'turtle' is not defined
138153

139-
when trying to view help? In Python you have to import names before you can refer to them, so in a new Python interactive shell you'll need to ``import turtle`` before ``help(turtle.color)`` will work.
154+
when trying to view help? In Python you have to import names before you
155+
can refer to them, so in a new Python interactive shell you'll need to
156+
``import turtle`` before ``help(turtle.color)`` will work.
140157

141158
Another way to find out about functions is to browse the `online documentation`_.
142159

@@ -168,6 +185,8 @@ Can you draw a rectangle too?
168185

169186
.. image:: /images/rectangle.png
170187

188+
.. rst-class:: solution
189+
171190
Solution
172191
--------
173192

@@ -202,6 +221,8 @@ experiment with the angles between the individual squares.
202221

203222
The picture shows three 20 degree turns. You could try 20, 30 and 40, for example.
204223

224+
.. rst-class:: solution
225+
205226
Solution
206227
--------
207228

@@ -240,4 +261,3 @@ Solution
240261
turtle.forward(50)
241262
turtle.left(90)
242263

243-

es_CL/_sources/variables.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Exercise
4848
If we have a variable called ``angle``, how could we use that to experiment
4949
much faster with our tilted squares program?
5050

51+
.. rst-class:: solution
52+
5153
Solution
5254
--------
5355

0 commit comments

Comments
 (0)