## Exercise 1

- Create a uniform subdivision of the interval -1.3 to 2.5 with 64 subdivisions.
- Generate an array of length $3n$ filled with the cyclic pattern 1, 2, 3.
- Create an array of the first 10 odd integers.
- Create a 10 x 10 arrays of zeros and then "frame" it with a border of ones.
- Create an 8 x 8 array with a checkerboard pattern of zeros and ones using a slicing+striding approach.

## Exercise 2

- Try using the
`dot` function on a vector-vector, matrix-vector and matrix-matrix example. (This may seem simple but it's good to see how the results differ in each case.)
- Create a plot of $x^2 \cdot \sin(1/x^2) + x$ on the interval $[-1, 1]$ using 250 points. Remember to label the axes!
- Create a
`semilogy` plot of the relative difference of $1 / (1+x^2)$ and $1/x^2$ on the interval $[5, 25]$. (The relative difference of numbers $a$ and $b$ is given by $|1-a/b|$. It provides a better sense of error relative to the order of magnitudes of $a$ and $b$.)
- It was mentioned that many common functions are availible in vectorized form. It turns out that Scipy also has many less common, special functions. Take a look at the extensive list here! Try looking for some interesting ones you recognize (or maybe don't recognize!) and either plug in a few numbers or plot them.

## Exercise 3

- Create a color plot of $\sin(x) \sin(y)$ on the interval $[-\pi, \pi] \times [-\pi, \pi]$.
- Create a function which creates an $n \times n$ array with $(i,j)$-entry equal to $i+j$.

## Exercise 4

- Evaluate $\cos$ and $\sin$ on the interval $[0, 1]$ and then stack the results into a tall array with rows being the $(\cos(x), \sin(x))$ entries.
- Create a random $3 \times 5$ array using the
`np.random.rand(3, 5)` function and compute: the sum of all the entries, the sum of the rows and the sum of the columns. (*Just like *`sorted` had an optional `key=` argument, many Numpy functions have an optional `axis=` argument!)
- Create a random $5 \times 5$ array using the function
`np.random.rand(5, 5)`. We want to sort the rows according to the second column. Try combining array slicing + argsort + indexing to do this.