@@ -60,6 +60,31 @@ We didn't get an error... but `(3, 14)` is not at all what we expected!
6060So from now on, let's use a dot with decimal numbers, because ` 3.14 `
6161worked just fine. Later we'll learn what ` (3, 14) ` is.
6262
63+ ## Comments
64+
65+ We can also type a ` # ` and then whatever we want after that. These bits
66+ of text are known as ** comments** , and we'll find uses for them later.
67+
68+ ``` python
69+ >> > 1 + 2 # can you guess what the result is?
70+ 3
71+ >> >
72+ ```
73+
74+ Again, I put a space after the ` # ` and multiple spaces before it just to
75+ make things easier to read.
76+
77+ If we write comment on a line with no code on it, the prompt changes
78+ from ` >>> ` to ` ... ` . To be honest, I have no idea why it does that and I
79+ think it would be better if it would just stay as ` >>> ` . The prompt goes
80+ back to ` >>> ` when we press Enter again.
81+
82+ ``` python
83+ >> > # hello there
84+ ...
85+ >> >
86+ ```
87+
6388## Using Python as a calculator
6489
6590``` diff
@@ -112,31 +137,6 @@ time you don't need them. Actually you don't need even these
112137calculations most of the time, but these calculations are probably
113138enough when you need to calculate something.
114139
115- ## Comments
116-
117- We can also type a ` # ` and then whatever we want after that. These bits
118- of text are known as ** comments** , and we'll find uses for them later.
119-
120- ``` python
121- >> > 1 + 2 # can you guess what the result is?
122- 3
123- >> >
124- ```
125-
126- Again, I put a space after the ` # ` and multiple spaces before it just to
127- make things easier to read.
128-
129- If we write comment on a line with no code on it, the prompt changes
130- from ` >>> ` to ` ... ` . To be honest, I have no idea why it does that and I
131- think it would be better if it would just stay as ` >>> ` . The prompt goes
132- back to ` >>> ` when we press Enter again.
133-
134- ``` python
135- >> > # hello there
136- ...
137- >> >
138- ```
139-
140140## Summary
141141
142142[ comment ] : # ( the first line in this summary is exactly same as in )
0 commit comments