In [1]:

```
# Variable declaration
x = (1 + 2) * 4
# Result
print ('1 plus 2 multiplied by 4 gives %d' % x)
```

In [2]:

```
# Variable declaration
term = 3 * 5
term_2 = 2 * term
term_3 = 3 * term
# Result
print ('Twice %d is %d' % (term, term_2))
print ('Three times %d is %d' % (term, term_3))
```

In [3]:

```
# Variable declaration
term = 3 * 5
term_2 = 2 * term
term_3 = 3 * term
# Result
print ('Twice %d is %d' % (term, term_2))
print ('Three times %d is %d' % (term, term_3))
```

In [4]:

```
# Variable declaration
answer = 1/3
# Result
print ('The value of 1/3 is %f' % answer)
```

In [5]:

```
answer = 2 + 2
# Result
print ('The answer is %d' % answer)
```

In [6]:

```
# Variable declaration
result = 7.0/22.0
# Result
print ('The result is %d' % result)
```

In [7]:

```
# Variable declaration
char1 = 'A'
char2 = 'B'
char3 = 'C'
# Result
print ('%c%c%c reversed is %c%c%c' % (char1, char2, char3, char3, char2, char1))
```