Try to use expressions that you would use in your normal work and see if they give the results you expect. Explore using brackets to group sub-expressions (things in brackets are always evaluated before everything else). Before you move on to the next section, use a single expression to calculate the length of the hypotenuse of a right angled triangle where the lengths of the other sides are 12 and 5, using Pythagoras’s Theorem.

Try to use expressions that you would use in your normal work and see if they give the results you expect. Explore using brackets to group sub-expressions (things in brackets are always evaluated before everything else). Before you move on to the next section, which of the following expressions would correctly calculate the hypotenuse of a right-angled triangle, with sides length 12 and 5?

%% Cell type:markdown id: tags:

a)

```Python

(12*2 + 5*2)/2

```

b)

```Python

(12**2 + 5**2)**0.5

```

c)

```Python

(12^2 + 5^2)^0.5

```

%% Cell type:code id: tags:

``` python

# type your command(s) here or use the IPython shell...

...

...

@@ -657,10 +672,26 @@

# type your command(s) here or use the IPython shell...

```

%% Cell type:markdown id: tags:

#### _Exercise 1.4_

%% Cell type:markdown id: tags:

Below is a set of commands working with a list of cities. First, the list is extended by adding 'Athens' onto the end, and then 'Nairobi' - the third element in the list - is assigned to the variable `kenya`. Some of the code has been removed (replaced with `---`). Fill in the blanks in the code block to make it work.