Finite Group is p-Group iff Order is Power of p

Theorem
Let $p$ be a prime number.

Let $G$ be a finite group.

Then $G$ is a $p$-group the order of $G$ is a power of $p$.

Necessary Condition
Let $G$ be a group whose order is $p^n$ for some $n \in \Z_{>0}$.

Let $g \in G$.

From Order of Element Divides Order of Finite Group, the order of $g$ is a divisor of $p^n$.

That is, $x$ is a $p$-element by definition.

As $x$ is arbitrary, it follows that all elements of $G$ are $p$-elements.

Thus $G$ is a $p$-group.

Sufficient Condition
Let $G$ be a $p$-group.

By definition, every element of $G$ is a $p$-element.

From Group with all $p$-Elements has Order of Power of $p$:
 * $G$ is a group whose order is $p^n$ for some $n \in \Z_{\ge 0}$.

Hence the result.