Solutions#

Question 1#

1. Create a new notebook rename it “exercises”. Navigate to it using your file browser to make sure you can find it.

Click the toggle (“Click to Show”) to see a demo of this:

Question 2#

2. Write and run some Python code to carry out the following calculations

1. \(3 + 8\)

3 + 8
11

2. \(3 / 7\)

3 / 7
0.42857142857142855

3. \(456 / 21\)

456 / 21
21.714285714285715

4. \(\frac{4 ^ 3 + 2}{2\times 5} - 5 ^ {\frac{1}{2}}\)

(4 ** 3 + 2) / (2 * 5) - 5 ** (1 / 2)
4.36393202250021

Question 3#

  1. Write a markdown cell with the following and view the rendered version:

# Euler's equation

$$
e ^ {i\pi} = -1
$$

Click the toggle (“Click to Show”) to see a demo of this:

Question 4#

4. Render the following expressions by writing markdown

1. \(\frac{4 ^ 3 + 2}{2\times 5}\)

$\frac{4 ^ 3 + 2}{2\times 5}$

2. \(- 5 ^ {\frac{1}{2}}\)

$- 5 ^ {\frac{1}{2}}$

3. \(\frac{df}{dx}\)

$\frac{df}{dx}$

4. \(\int_{5}^{12}x^2dx\)

$\int_{5}^{12}x^2dx$

5. \(\begin{pmatrix}4 & 12 & 3\\2 & x & i\\\end{pmatrix}\)

$\begin{pmatrix}4 & 12 & 3\\2 & x & i\\\end{pmatrix}$

Question 5#

5. Save your notebook to HTML and open and view it.

Click the toggle (“Click to Show”) to see a demo of this:

Question 6#

6. Download the notebook available at 10.5281/zenodo.7118738 and check that you are able to open it.

Click the toggle (“Click to Show”) to see a demo of this: