2 files changed
+10
-3
lines changedLines changed: 9 additions & 2 deletions
@@ -53,6 +53,11 @@ All of these `.py` files can be imported like we just imported
53
53
so we can use its randint variable with `random.randint` after
54
54
importing it.
55
55
56
+You're probably wondering how a computer can generate random numbers.
57
+The random module does different things on different operating systems,
58
+but on most systems it reads random noise that several programs on the
59
+computer produce and creates random numbers based on that.
60
+
56
61
## Where do modules come from?
57
62
58
63
Create a `random.py` file with the following content:
@@ -97,7 +102,7 @@ AttributeError: 'module' object has no attribute 'randint'
97
102
>>>
98
103
```
99
104
100
-So first of all, what is that random variable?
105
+So first of all, what is that `random` variable?
101
106
102
107
```python
103
108
>>> random
@@ -285,7 +290,7 @@ The official documentation for the time module is
285
290
>>> time.time() # return time in seconds since beginning of the year 1970
286
291
1474896325.2394648
287
292
>>> time.strftime('%d.%m.%Y %H:%M:%S') # format current time nicely
288
-'26.09.2016 16:33:58'
293
+'07.04.2017 19:08:33'
289
294
>>>
290
295
```
291
296
@@ -482,6 +487,8 @@ section at the bottom.
482
487
- Python comes with many modules, and we can install even more modules
483
488
if we want to.
484
489
490
+**TODO:** exercises
491
+
485
492
***
486
493
487
494
If you have trouble with this tutorial please [tell me about
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
|
0 commit comments