$\displaystyle \sum_{i\,=\,1}^n\left(1-\frac{i-1}n\right)\frac1n$

$\displaystyle =\ \frac1n\sum_{i\,=\,1}^n1-\frac1{n^2}\sum_{i\,=\,1}^n(i-1)$

$\displaystyle =\ \frac1n(n)-\frac1{n^2}\cdot\frac{n(n-1)}2$

$\displaystyle =\ 1-\frac{n-1}{2n}$

$\displaystyle =\ \frac{n+1}{2n}$

The second one is

$\displaystyle \sum_{i\,=\,1}^n\left(1-\frac in\right)\frac1n$

$\displaystyle =\ \sum_{i\,=\,2}^{n+1}\left(1-\frac{i-1}n\right)\frac1n$

$\displaystyle =\ \sum_{i\,=\,1}^{n}\left(1-\frac{i-1}n\right)\frac1n\,+\left(1-\frac {(n+1)-1}n\right)\frac1n-\left(1-\frac{1-1}n\right)\frac1n$

$\displaystyle =\ \frac{n+1}{2n}+0-\frac1n$

$\displaystyle =\ \frac{n-1}{2n}$