# Exercises¶

## Do the following problems.¶

### Jupyter Notebook Shortcuts:¶

There are two modes when a cell is highlighted.

#### Command Mode: Press ESC to activate. The cell has a blue border if this mode is active. In this mode, you can add, delete, create, copy and paste cells.¶

• create a new cell above the current cell: a
• create a new cell below the current cell: b
• delete the current cell: dd
• change the current cell’s type to “Code”: y
• change the current cell’s type to “Markdown”: m

#### Edit Mode: Press ENTER to activate. The cell has a green border if this mode is active. In this mode, you can edit and type text into the cell.¶

• execute the current cell and create a new cell: SHIFT + ENTER

#### Write code to compute the following. Remember to import the math library.¶

• $2^{16}$
• $\dfrac{2-(3+4\cdot7)}{5}$
• $(2-3i)+(4+i)$
• $(2+i)(4-3i)$
• $\sqrt{234}$
• 13//4
• -10 // 3
• $\sin(3\pi/5)$ (Use math.pi)
In [ ]:



#### Compute the following boolean expression with code.¶

x = 3 y = 10 z = -5

• $x\leq 1$ or $y = 10$
• $z > 0$ and $y > 0$
• not $(x\neq 3$ or $y >= -5)$
In [ ]:



#### Mike's total on five tests is 384. What is the average of his tests?¶

In [103]:
total = 384


#### where $s=\dfrac{a+b+c}{2}$. Compute the area of this triangle. Your code should include all 5 variables.¶

In [ ]:



#### Use the quadratic formula to solve $x^2+4x-3=0$. The quadratic formula is¶

$$\frac{-b\pm\sqrt{b^2-4ac}}{2a}.$$

In [1]:
import math # use math.sqrt()


#### If today is Monday. Which day of the week is $4534$ days from now? (Hint: Use %).¶

In [ ]:



#### Create at least four other variables: hours, minutes and seconds and remaining.¶

In [ ]: