@@ -18,16 +18,16 @@ In Python syntax, that very statement translates to::
1818
1919 x = 5
2020
21- After that statement, if you do ``print x ``, it will actually output its value
21+ After that statement, if you do ``print(x) ``, it will actually output its value
2222--- 5. You can well use that for turtle too::
2323
2424 turtle.forward(x)
2525
2626
27- .. note:: You can not save numbers in variables, like we did here for "x", but
28- you can actually save various kinds of things in them. A typical other thing
29- you want to have store often is a "string" - a line of text. Strings are
30- indicated with a starting and a leading \". You'll learn about this and
27+ .. note:: You can not only save numbers in variables, like we did here for "x",
28+ but you can actually save various kinds of things in them. A typical other
29+ thing you want to have store often is a "string" - a line of text. Strings
30+ are indicated with a starting and a leading \". You'll learn about this and
3131 other types, as those are called in Python, and what you can do with them
3232 later on.
3333
@@ -76,7 +76,12 @@ Draw a house.
7676
7777.. image:: /images/house.png
7878
79- You can calculate the length of the diagonal line with Pythagoras. That value
80- is a good candidate for a name binding.
79+ You can calculate the length of the diagonal line with Pythagoras. That value is
80+ a good candidate for a name binding. To calculate the square root of a number in
81+ Python, import the *math* module and use the ``math.sqrt()`` function. The
82+ square of a number is calculated with the ``\*\*`` operator::
8183
84+ import math
85+
86+ c = math.sqrt(a**2 + b**2)
8287
0 commit comments