**1**. Replicate the contents below by creating a new (MarkDown) cell below this one (using keyboard shortcuts).

## Euler's formula

The function $e^{i \phi}$ traces the unit circle in the complex plane. 

$$
e^{i\phi} = \cos \phi + i \sin \phi
$$

This implies that 

\begin{align}
\cos x &= \Re(e^{i x}) &= \frac{e^{ix} + e^{-ix}}{2} \\
\sin x &= \Im(e^{i x}) &= \frac{e^{ix} - e^{-ix}}{2} 
\end{align}

In Python, we can express the second function as 
```python
def sin(x):
    """The sine function ."""
    import numpy as np
    return 0.5*(np.exp(x*1j) - np.exp(-x*1j))
```

**1.5**. Delete this cell using a keyboard shortcut.

**2**. Write a program to create a list of the first 100 Fizz buzz numbers. Any number divisible by three is replaced by the word fizz and any divisible by five by the word buzz. Numbers divisible by both become fizz buzz. Otherwise the original number is retained.

For example, the first Fizz buzz numbers are  `1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ...`.

**3**. A Pythagorean triplet is a set of 3 integers $a, b, c$ such that $a^2 + b^2 = c^2$. For example, the tuple (3,4,5) is a  Pythagorean triplet. Find all Pythagorean triplets where $c < 100$.

**4**. Write a program using a dictionary to find the top 3 most frequently occurring words and how often they occur in the passage given below. Remove punctuation and convert words to lower case. We consider a word to be any continuous sequence of characters or numbers separated by whitespace.
    
> Write a program to create a list of the first 100 Fizz buzz numbers. Any number divisible by three is replaced by the word fizz and any divisible by five by the word buzz. Numbers divisible by both become fizz buzz. Otherwise the original number is retained.
For example, the first Fizz buzz numbers are  1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ....


```python

```

712b86606ec4a5fc51e0e81dfcb8a28ae6b9e1fc
ipynb
Jupyter Notebook
worksheet/01_Programming_In_Python.ipynb
cliburn/sta-663-2017
89e059dfff25a4aa427cdec5ded755ab456fbc16
MIT
2017-01-11T03:16:00.000Z
2021-01-15T05:28:48.000Z
worksheet/01_Programming_In_Python.ipynb
slimdt/Duke_Stat633_2017
89e059dfff25a4aa427cdec5ded755ab456fbc16
MIT
2017-04-16T17:10:49.000Z
2017-04-16T19:13:03.000Z
worksheet/01_Programming_In_Python.ipynb
slimdt/Duke_Stat633_2017
89e059dfff25a4aa427cdec5ded755ab456fbc16
MIT
2017-01-13T04:50:54.000Z
2021-06-23T11:48:33.000Z
Qwen/Qwen-72B
1. YES
2. YES