Kernel: Python 2 (SageMath)
Tian Qiu
**Exercise:**
Write a function that takes as an argument a positive integer, and generates a list of integers between 0 and that number, separated by 1. That is, if you entered 5, the function should generate
In [6]:
Out[6]:
[0, 1, 2, 3, 4, 5]
**Exercise:**
Create a 1-d numpy array (call it ```ts``` for timestamps), with increasing integers from 3 to 300 (including 3 but not 300) with increment of 3, and print the array
In [1]:
Out[1]:
ts: [ 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54
57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 102 105 108
111 114 117 120 123 126 129 132 135 138 141 144 147 150 153 156 159 162
165 168 171 174 177 180 183 186 189 192 195 198 201 204 207 210 213 216
219 222 225 228 231 234 237 240 243 246 249 252 255 258 261 264 267 270
273 276 279 282 285 288 291 294 297]
**Exercise **
Modify the above plot in the following ways:
- Add a title to each subplot, and the figure as a whole
- Label all axes
- Modify the x-labels on the lower-left plot such that there is a tick every 0.5 points (0, 0.5, 1, 1.5, etc).
In [3]:
Out[3]:
<matplotlib.text.Text at 0x7f8af5aff250>